goimports -local github.com/docker/compose-cli -w . ; gofmt -s -w .

Signed-off-by: Guillaume Tardif <guillaume.tardif@gmail.com>
This commit is contained in:
Guillaume Tardif 2021-01-15 16:24:00 +01:00
parent 801e747adb
commit 930ae8bdb2
29 changed files with 48 additions and 34 deletions

View File

@ -38,9 +38,9 @@ import (
"github.com/docker/compose-cli/aci/login" "github.com/docker/compose-cli/aci/login"
"github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/api/client"
"github.com/docker/compose-cli/api/containers" "github.com/docker/compose-cli/api/containers"
"github.com/docker/compose-cli/api/progress"
"github.com/docker/compose-cli/context/store" "github.com/docker/compose-cli/context/store"
"github.com/docker/compose-cli/errdefs" "github.com/docker/compose-cli/errdefs"
"github.com/docker/compose-cli/api/progress"
) )
func createACIContainers(ctx context.Context, aciContext store.AciContext, groupDefinition containerinstance.ContainerGroup) error { func createACIContainers(ctx context.Context, aciContext store.AciContext, groupDefinition containerinstance.ContainerGroup) error {

View File

@ -33,8 +33,8 @@ import (
"github.com/docker/compose-cli/api/secrets" "github.com/docker/compose-cli/api/secrets"
"github.com/docker/compose-cli/api/volumes" "github.com/docker/compose-cli/api/volumes"
apicontext "github.com/docker/compose-cli/context"
"github.com/docker/compose-cli/api/cloud" "github.com/docker/compose-cli/api/cloud"
apicontext "github.com/docker/compose-cli/context"
"github.com/docker/compose-cli/context/store" "github.com/docker/compose-cli/context/store"
) )

View File

@ -29,10 +29,10 @@ import (
"github.com/Azure/go-autorest/autorest/to" "github.com/Azure/go-autorest/autorest/to"
"github.com/docker/compose-cli/aci/login" "github.com/docker/compose-cli/aci/login"
"github.com/docker/compose-cli/api/progress"
"github.com/docker/compose-cli/api/volumes" "github.com/docker/compose-cli/api/volumes"
"github.com/docker/compose-cli/context/store" "github.com/docker/compose-cli/context/store"
"github.com/docker/compose-cli/errdefs" "github.com/docker/compose-cli/errdefs"
"github.com/docker/compose-cli/api/progress"
) )
type aciVolumeService struct { type aciVolumeService struct {

View File

@ -23,12 +23,12 @@ import (
"github.com/sirupsen/logrus" "github.com/sirupsen/logrus"
"github.com/docker/compose-cli/api/cloud"
"github.com/docker/compose-cli/api/compose" "github.com/docker/compose-cli/api/compose"
"github.com/docker/compose-cli/api/containers" "github.com/docker/compose-cli/api/containers"
"github.com/docker/compose-cli/api/resources" "github.com/docker/compose-cli/api/resources"
"github.com/docker/compose-cli/api/secrets" "github.com/docker/compose-cli/api/secrets"
"github.com/docker/compose-cli/api/volumes" "github.com/docker/compose-cli/api/volumes"
"github.com/docker/compose-cli/api/cloud"
"github.com/docker/compose-cli/errdefs" "github.com/docker/compose-cli/errdefs"
) )

View File

@ -20,13 +20,13 @@ import (
"context" "context"
"github.com/docker/compose-cli/api/backend" "github.com/docker/compose-cli/api/backend"
"github.com/docker/compose-cli/api/cloud"
"github.com/docker/compose-cli/api/compose" "github.com/docker/compose-cli/api/compose"
"github.com/docker/compose-cli/api/containers" "github.com/docker/compose-cli/api/containers"
"github.com/docker/compose-cli/api/resources" "github.com/docker/compose-cli/api/resources"
"github.com/docker/compose-cli/api/secrets" "github.com/docker/compose-cli/api/secrets"
"github.com/docker/compose-cli/api/volumes" "github.com/docker/compose-cli/api/volumes"
apicontext "github.com/docker/compose-cli/context" apicontext "github.com/docker/compose-cli/context"
"github.com/docker/compose-cli/api/cloud"
"github.com/docker/compose-cli/context/store" "github.com/docker/compose-cli/context/store"
) )

View File

@ -24,9 +24,9 @@ import (
"github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/api/client"
"github.com/docker/compose-cli/api/compose" "github.com/docker/compose-cli/api/compose"
"github.com/docker/compose-cli/api/progress"
"github.com/docker/compose-cli/context/store" "github.com/docker/compose-cli/context/store"
"github.com/docker/compose-cli/formatter" "github.com/docker/compose-cli/formatter"
"github.com/docker/compose-cli/api/progress"
"github.com/compose-spec/compose-go/cli" "github.com/compose-spec/compose-go/cli"
"github.com/compose-spec/compose-go/types" "github.com/compose-spec/compose-go/types"

View File

@ -23,12 +23,13 @@ import (
"os" "os"
"strings" "strings"
"github.com/pkg/errors"
"github.com/spf13/cobra"
"github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/api/client"
"github.com/docker/compose-cli/context/store" "github.com/docker/compose-cli/context/store"
"github.com/docker/compose-cli/ecs" "github.com/docker/compose-cli/ecs"
"github.com/docker/compose-cli/errdefs" "github.com/docker/compose-cli/errdefs"
"github.com/pkg/errors"
"github.com/spf13/cobra"
) )
func init() { func init() {

View File

@ -28,9 +28,9 @@ import (
"github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/api/client"
"github.com/docker/compose-cli/api/containers" "github.com/docker/compose-cli/api/containers"
"github.com/docker/compose-cli/api/progress"
"github.com/docker/compose-cli/cli/options/run" "github.com/docker/compose-cli/cli/options/run"
"github.com/docker/compose-cli/context/store" "github.com/docker/compose-cli/context/store"
"github.com/docker/compose-cli/api/progress"
) )
// Command runs a container // Command runs a container

View File

@ -22,11 +22,11 @@ import (
"github.com/docker/compose-cli/aci" "github.com/docker/compose-cli/aci"
"github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/api/client"
"github.com/docker/compose-cli/api/progress"
"github.com/docker/compose-cli/cli/formatter" "github.com/docker/compose-cli/cli/formatter"
"github.com/docker/compose-cli/context/store" "github.com/docker/compose-cli/context/store"
"github.com/docker/compose-cli/ecs" "github.com/docker/compose-cli/ecs"
formatter2 "github.com/docker/compose-cli/formatter" formatter2 "github.com/docker/compose-cli/formatter"
"github.com/docker/compose-cli/api/progress"
"github.com/hashicorp/go-multierror" "github.com/hashicorp/go-multierror"
"github.com/spf13/cobra" "github.com/spf13/cobra"

View File

@ -23,14 +23,15 @@ package v1
import ( import (
context "context" context "context"
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
const ( const (

View File

@ -23,14 +23,15 @@ package v1
import ( import (
context "context" context "context"
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
const ( const (

View File

@ -23,14 +23,15 @@ package v1
import ( import (
context "context" context "context"
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes" codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
const ( const (

View File

@ -23,6 +23,9 @@ package v1
import ( import (
context "context" context "context"
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
any "github.com/golang/protobuf/ptypes/any" any "github.com/golang/protobuf/ptypes/any"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
@ -30,8 +33,6 @@ import (
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
const ( const (

View File

@ -23,6 +23,9 @@ package v1
import ( import (
context "context" context "context"
reflect "reflect"
sync "sync"
proto "github.com/golang/protobuf/proto" proto "github.com/golang/protobuf/proto"
_ "github.com/golang/protobuf/ptypes/any" _ "github.com/golang/protobuf/ptypes/any"
grpc "google.golang.org/grpc" grpc "google.golang.org/grpc"
@ -30,8 +33,6 @@ import (
status "google.golang.org/grpc/status" status "google.golang.org/grpc/status"
protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoreflect "google.golang.org/protobuf/reflect/protoreflect"
protoimpl "google.golang.org/protobuf/runtime/protoimpl" protoimpl "google.golang.org/protobuf/runtime/protoimpl"
reflect "reflect"
sync "sync"
) )
const ( const (

View File

@ -21,9 +21,10 @@ import (
"gotest.tools/v3/assert" "gotest.tools/v3/assert"
"github.com/google/go-cmp/cmp/cmpopts"
contextsv1 "github.com/docker/compose-cli/cli/server/protos/contexts/v1" contextsv1 "github.com/docker/compose-cli/cli/server/protos/contexts/v1"
"github.com/docker/compose-cli/context/store" "github.com/docker/compose-cli/context/store"
"github.com/google/go-cmp/cmp/cmpopts"
) )
func TestConvertContext(t *testing.T) { func TestConvertContext(t *testing.T) {

View File

@ -21,6 +21,7 @@ import (
"github.com/aws/aws-sdk-go/service/cloudformation" "github.com/aws/aws-sdk-go/service/cloudformation"
"github.com/aws/aws-sdk-go/service/ecs" "github.com/aws/aws-sdk-go/service/ecs"
"github.com/docker/compose-cli/api/compose" "github.com/docker/compose-cli/api/compose"
"github.com/docker/compose-cli/api/secrets" "github.com/docker/compose-cli/api/secrets"
) )

View File

@ -6,12 +6,14 @@ package ecs
import ( import (
context "context" context "context"
reflect "reflect"
cloudformation "github.com/aws/aws-sdk-go/service/cloudformation" cloudformation "github.com/aws/aws-sdk-go/service/cloudformation"
ecs "github.com/aws/aws-sdk-go/service/ecs" ecs "github.com/aws/aws-sdk-go/service/ecs"
gomock "github.com/golang/mock/gomock"
compose "github.com/docker/compose-cli/api/compose" compose "github.com/docker/compose-cli/api/compose"
secrets "github.com/docker/compose-cli/api/secrets" secrets "github.com/docker/compose-cli/api/secrets"
gomock "github.com/golang/mock/gomock"
reflect "reflect"
) )
// MockAPI is a mock of API interface // MockAPI is a mock of API interface

View File

@ -22,13 +22,13 @@ import (
"github.com/docker/compose-cli/api/backend" "github.com/docker/compose-cli/api/backend"
"github.com/docker/compose-cli/api/cloud"
"github.com/docker/compose-cli/api/compose" "github.com/docker/compose-cli/api/compose"
"github.com/docker/compose-cli/api/containers" "github.com/docker/compose-cli/api/containers"
"github.com/docker/compose-cli/api/resources" "github.com/docker/compose-cli/api/resources"
"github.com/docker/compose-cli/api/secrets" "github.com/docker/compose-cli/api/secrets"
"github.com/docker/compose-cli/api/volumes" "github.com/docker/compose-cli/api/volumes"
apicontext "github.com/docker/compose-cli/context" apicontext "github.com/docker/compose-cli/context"
"github.com/docker/compose-cli/api/cloud"
"github.com/docker/compose-cli/context/store" "github.com/docker/compose-cli/context/store"
"github.com/docker/compose-cli/errdefs" "github.com/docker/compose-cli/errdefs"

View File

@ -24,12 +24,12 @@ import (
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/docker/compose-cli/api/backend" "github.com/docker/compose-cli/api/backend"
"github.com/docker/compose-cli/api/cloud"
"github.com/docker/compose-cli/api/compose" "github.com/docker/compose-cli/api/compose"
"github.com/docker/compose-cli/api/containers" "github.com/docker/compose-cli/api/containers"
"github.com/docker/compose-cli/api/resources" "github.com/docker/compose-cli/api/resources"
"github.com/docker/compose-cli/api/secrets" "github.com/docker/compose-cli/api/secrets"
"github.com/docker/compose-cli/api/volumes" "github.com/docker/compose-cli/api/volumes"
"github.com/docker/compose-cli/api/cloud"
"github.com/docker/compose-cli/context/store" "github.com/docker/compose-cli/context/store"
) )

View File

@ -25,10 +25,11 @@ import (
"github.com/aws/aws-sdk-go/aws" "github.com/aws/aws-sdk-go/aws"
"github.com/compose-spec/compose-go/types" "github.com/compose-spec/compose-go/types"
"github.com/docker/compose-cli/api/compose"
"github.com/docker/compose-cli/errdefs"
"github.com/pkg/errors" "github.com/pkg/errors"
"github.com/sanathkr/go-yaml" "github.com/sanathkr/go-yaml"
"github.com/docker/compose-cli/api/compose"
"github.com/docker/compose-cli/errdefs"
) )
func (e ecsLocalSimulation) Build(ctx context.Context, project *types.Project) error { func (e ecsLocalSimulation) Build(ctx context.Context, project *types.Project) error {

View File

@ -20,6 +20,7 @@ import (
"context" "context"
"github.com/compose-spec/compose-go/types" "github.com/compose-spec/compose-go/types"
"github.com/docker/compose-cli/api/compose" "github.com/docker/compose-cli/api/compose"
"github.com/docker/compose-cli/errdefs" "github.com/docker/compose-cli/errdefs"
) )

View File

@ -19,6 +19,7 @@ package ecs
import ( import (
"github.com/awslabs/goformation/v4/cloudformation/tags" "github.com/awslabs/goformation/v4/cloudformation/tags"
"github.com/compose-spec/compose-go/types" "github.com/compose-spec/compose-go/types"
"github.com/docker/compose-cli/api/compose" "github.com/docker/compose-cli/api/compose"
) )

View File

@ -24,12 +24,12 @@ import (
"fmt" "fmt"
"github.com/docker/compose-cli/api/backend" "github.com/docker/compose-cli/api/backend"
"github.com/docker/compose-cli/api/cloud"
"github.com/docker/compose-cli/api/compose" "github.com/docker/compose-cli/api/compose"
"github.com/docker/compose-cli/api/containers" "github.com/docker/compose-cli/api/containers"
"github.com/docker/compose-cli/api/resources" "github.com/docker/compose-cli/api/resources"
"github.com/docker/compose-cli/api/secrets" "github.com/docker/compose-cli/api/secrets"
"github.com/docker/compose-cli/api/volumes" "github.com/docker/compose-cli/api/volumes"
"github.com/docker/compose-cli/api/cloud"
"github.com/docker/compose-cli/errdefs" "github.com/docker/compose-cli/errdefs"
"github.com/compose-spec/compose-go/types" "github.com/compose-spec/compose-go/types"

View File

@ -22,12 +22,12 @@ import (
"github.com/docker/docker/client" "github.com/docker/docker/client"
"github.com/docker/compose-cli/api/backend" "github.com/docker/compose-cli/api/backend"
"github.com/docker/compose-cli/api/cloud"
"github.com/docker/compose-cli/api/compose" "github.com/docker/compose-cli/api/compose"
"github.com/docker/compose-cli/api/containers" "github.com/docker/compose-cli/api/containers"
"github.com/docker/compose-cli/api/resources" "github.com/docker/compose-cli/api/resources"
"github.com/docker/compose-cli/api/secrets" "github.com/docker/compose-cli/api/secrets"
"github.com/docker/compose-cli/api/volumes" "github.com/docker/compose-cli/api/volumes"
"github.com/docker/compose-cli/api/cloud"
local_compose "github.com/docker/compose-cli/local/compose" local_compose "github.com/docker/compose-cli/local/compose"
) )

View File

@ -28,8 +28,8 @@ import (
"github.com/docker/docker/api/types/network" "github.com/docker/docker/api/types/network"
"golang.org/x/sync/errgroup" "golang.org/x/sync/errgroup"
status "github.com/docker/compose-cli/local/moby"
"github.com/docker/compose-cli/api/progress" "github.com/docker/compose-cli/api/progress"
status "github.com/docker/compose-cli/local/moby"
) )
const ( const (

View File

@ -38,8 +38,8 @@ import (
"golang.org/x/sync/errgroup" "golang.org/x/sync/errgroup"
"github.com/docker/compose-cli/api/compose" "github.com/docker/compose-cli/api/compose"
convert "github.com/docker/compose-cli/local/moby"
"github.com/docker/compose-cli/api/progress" "github.com/docker/compose-cli/api/progress"
convert "github.com/docker/compose-cli/local/moby"
) )
func (s *composeService) Create(ctx context.Context, project *types.Project, opts compose.CreateOptions) error { func (s *composeService) Create(ctx context.Context, project *types.Project, opts compose.CreateOptions) error {

View File

@ -32,8 +32,8 @@ import (
"github.com/docker/docker/registry" "github.com/docker/docker/registry"
"golang.org/x/sync/errgroup" "golang.org/x/sync/errgroup"
"github.com/docker/compose-cli/config"
"github.com/docker/compose-cli/api/progress" "github.com/docker/compose-cli/api/progress"
"github.com/docker/compose-cli/config"
) )
func (s *composeService) Pull(ctx context.Context, project *types.Project) error { func (s *composeService) Pull(ctx context.Context, project *types.Project) error {

View File

@ -25,8 +25,8 @@ import (
"github.com/docker/buildx/driver" "github.com/docker/buildx/driver"
"github.com/docker/compose-cli/config"
"github.com/docker/compose-cli/api/progress" "github.com/docker/compose-cli/api/progress"
"github.com/docker/compose-cli/config"
"github.com/compose-spec/compose-go/types" "github.com/compose-spec/compose-go/types"
cliconfig "github.com/docker/cli/cli/config" cliconfig "github.com/docker/cli/cli/config"

View File

@ -5,8 +5,9 @@
package prompt package prompt
import ( import (
gomock "github.com/golang/mock/gomock"
reflect "reflect" reflect "reflect"
gomock "github.com/golang/mock/gomock"
) )
// MockUI is a mock of UI interface // MockUI is a mock of UI interface