From 930ae8bdb2aabe700550f524c8385860db95a101 Mon Sep 17 00:00:00 2001 From: Guillaume Tardif Date: Fri, 15 Jan 2021 16:24:00 +0100 Subject: [PATCH] goimports -local github.com/docker/compose-cli -w . ; gofmt -s -w . Signed-off-by: Guillaume Tardif --- aci/aci.go | 2 +- aci/backend.go | 2 +- aci/volumes.go | 2 +- api/backend/backend.go | 2 +- api/client/client.go | 2 +- cli/cmd/compose/up.go | 2 +- cli/cmd/context/create_ecs.go | 5 +++-- cli/cmd/run/run.go | 2 +- cli/cmd/volume/command.go | 2 +- cli/server/protos/compose/v1/compose.pb.go | 5 +++-- cli/server/protos/containers/v1/containers.pb.go | 5 +++-- cli/server/protos/contexts/v1/contexts.pb.go | 5 +++-- cli/server/protos/streams/v1/streams.pb.go | 5 +++-- cli/server/protos/volumes/v1/volumes.pb.go | 5 +++-- cli/server/proxy/contexts_test.go | 3 ++- ecs/aws.go | 1 + ecs/aws_mock.go | 6 ++++-- ecs/backend.go | 2 +- ecs/local/backend.go | 2 +- ecs/local/compose.go | 5 +++-- ecs/run.go | 1 + ecs/tags.go | 1 + example/backend.go | 2 +- local/backend.go | 2 +- local/compose/convergence.go | 2 +- local/compose/create.go | 2 +- local/compose/pull.go | 2 +- local/compose/push.go | 2 +- prompt/prompt_mock.go | 3 ++- 29 files changed, 48 insertions(+), 34 deletions(-) diff --git a/aci/aci.go b/aci/aci.go index 13f941114..58998d577 100644 --- a/aci/aci.go +++ b/aci/aci.go @@ -38,9 +38,9 @@ import ( "github.com/docker/compose-cli/aci/login" "github.com/docker/compose-cli/api/client" "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/errdefs" - "github.com/docker/compose-cli/api/progress" ) func createACIContainers(ctx context.Context, aciContext store.AciContext, groupDefinition containerinstance.ContainerGroup) error { diff --git a/aci/backend.go b/aci/backend.go index 547c5612e..73fa1d44b 100644 --- a/aci/backend.go +++ b/aci/backend.go @@ -33,8 +33,8 @@ import ( "github.com/docker/compose-cli/api/secrets" "github.com/docker/compose-cli/api/volumes" - apicontext "github.com/docker/compose-cli/context" "github.com/docker/compose-cli/api/cloud" + apicontext "github.com/docker/compose-cli/context" "github.com/docker/compose-cli/context/store" ) diff --git a/aci/volumes.go b/aci/volumes.go index d6c7b972c..5f25d0614 100644 --- a/aci/volumes.go +++ b/aci/volumes.go @@ -29,10 +29,10 @@ import ( "github.com/Azure/go-autorest/autorest/to" "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/context/store" "github.com/docker/compose-cli/errdefs" - "github.com/docker/compose-cli/api/progress" ) type aciVolumeService struct { diff --git a/api/backend/backend.go b/api/backend/backend.go index 77d3e0b53..b5b575b7e 100644 --- a/api/backend/backend.go +++ b/api/backend/backend.go @@ -23,12 +23,12 @@ import ( "github.com/sirupsen/logrus" + "github.com/docker/compose-cli/api/cloud" "github.com/docker/compose-cli/api/compose" "github.com/docker/compose-cli/api/containers" "github.com/docker/compose-cli/api/resources" "github.com/docker/compose-cli/api/secrets" "github.com/docker/compose-cli/api/volumes" - "github.com/docker/compose-cli/api/cloud" "github.com/docker/compose-cli/errdefs" ) diff --git a/api/client/client.go b/api/client/client.go index b9cd502b9..44e72c7f7 100644 --- a/api/client/client.go +++ b/api/client/client.go @@ -20,13 +20,13 @@ import ( "context" "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/containers" "github.com/docker/compose-cli/api/resources" "github.com/docker/compose-cli/api/secrets" "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/context/store" ) diff --git a/cli/cmd/compose/up.go b/cli/cmd/compose/up.go index 2aabd1fc8..3533a2c02 100644 --- a/cli/cmd/compose/up.go +++ b/cli/cmd/compose/up.go @@ -24,9 +24,9 @@ import ( "github.com/docker/compose-cli/api/client" "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/formatter" - "github.com/docker/compose-cli/api/progress" "github.com/compose-spec/compose-go/cli" "github.com/compose-spec/compose-go/types" diff --git a/cli/cmd/context/create_ecs.go b/cli/cmd/context/create_ecs.go index 2d76bf0d1..59ce01251 100644 --- a/cli/cmd/context/create_ecs.go +++ b/cli/cmd/context/create_ecs.go @@ -23,12 +23,13 @@ import ( "os" "strings" + "github.com/pkg/errors" + "github.com/spf13/cobra" + "github.com/docker/compose-cli/api/client" "github.com/docker/compose-cli/context/store" "github.com/docker/compose-cli/ecs" "github.com/docker/compose-cli/errdefs" - "github.com/pkg/errors" - "github.com/spf13/cobra" ) func init() { diff --git a/cli/cmd/run/run.go b/cli/cmd/run/run.go index aa8e7aa56..5219555af 100644 --- a/cli/cmd/run/run.go +++ b/cli/cmd/run/run.go @@ -28,9 +28,9 @@ import ( "github.com/docker/compose-cli/api/client" "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/context/store" - "github.com/docker/compose-cli/api/progress" ) // Command runs a container diff --git a/cli/cmd/volume/command.go b/cli/cmd/volume/command.go index 78312d0a5..ba692cefd 100644 --- a/cli/cmd/volume/command.go +++ b/cli/cmd/volume/command.go @@ -22,11 +22,11 @@ import ( "github.com/docker/compose-cli/aci" "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/context/store" "github.com/docker/compose-cli/ecs" formatter2 "github.com/docker/compose-cli/formatter" - "github.com/docker/compose-cli/api/progress" "github.com/hashicorp/go-multierror" "github.com/spf13/cobra" diff --git a/cli/server/protos/compose/v1/compose.pb.go b/cli/server/protos/compose/v1/compose.pb.go index 712fa40f6..820be0d37 100644 --- a/cli/server/protos/compose/v1/compose.pb.go +++ b/cli/server/protos/compose/v1/compose.pb.go @@ -23,14 +23,15 @@ package v1 import ( context "context" + reflect "reflect" + sync "sync" + proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/cli/server/protos/containers/v1/containers.pb.go b/cli/server/protos/containers/v1/containers.pb.go index 2a34bde3d..638a37800 100644 --- a/cli/server/protos/containers/v1/containers.pb.go +++ b/cli/server/protos/containers/v1/containers.pb.go @@ -23,14 +23,15 @@ package v1 import ( context "context" + reflect "reflect" + sync "sync" + proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/cli/server/protos/contexts/v1/contexts.pb.go b/cli/server/protos/contexts/v1/contexts.pb.go index 761a95895..201becdcf 100644 --- a/cli/server/protos/contexts/v1/contexts.pb.go +++ b/cli/server/protos/contexts/v1/contexts.pb.go @@ -23,14 +23,15 @@ package v1 import ( context "context" + reflect "reflect" + sync "sync" + proto "github.com/golang/protobuf/proto" grpc "google.golang.org/grpc" codes "google.golang.org/grpc/codes" status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/cli/server/protos/streams/v1/streams.pb.go b/cli/server/protos/streams/v1/streams.pb.go index f9c54bb16..12a3b5ce9 100644 --- a/cli/server/protos/streams/v1/streams.pb.go +++ b/cli/server/protos/streams/v1/streams.pb.go @@ -23,6 +23,9 @@ package v1 import ( context "context" + reflect "reflect" + sync "sync" + proto "github.com/golang/protobuf/proto" any "github.com/golang/protobuf/ptypes/any" grpc "google.golang.org/grpc" @@ -30,8 +33,6 @@ import ( status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/cli/server/protos/volumes/v1/volumes.pb.go b/cli/server/protos/volumes/v1/volumes.pb.go index b6b2433c7..6ee4208d3 100644 --- a/cli/server/protos/volumes/v1/volumes.pb.go +++ b/cli/server/protos/volumes/v1/volumes.pb.go @@ -23,6 +23,9 @@ package v1 import ( context "context" + reflect "reflect" + sync "sync" + proto "github.com/golang/protobuf/proto" _ "github.com/golang/protobuf/ptypes/any" grpc "google.golang.org/grpc" @@ -30,8 +33,6 @@ import ( status "google.golang.org/grpc/status" protoreflect "google.golang.org/protobuf/reflect/protoreflect" protoimpl "google.golang.org/protobuf/runtime/protoimpl" - reflect "reflect" - sync "sync" ) const ( diff --git a/cli/server/proxy/contexts_test.go b/cli/server/proxy/contexts_test.go index 444d670db..cacb06e1f 100644 --- a/cli/server/proxy/contexts_test.go +++ b/cli/server/proxy/contexts_test.go @@ -21,9 +21,10 @@ import ( "gotest.tools/v3/assert" + "github.com/google/go-cmp/cmp/cmpopts" + contextsv1 "github.com/docker/compose-cli/cli/server/protos/contexts/v1" "github.com/docker/compose-cli/context/store" - "github.com/google/go-cmp/cmp/cmpopts" ) func TestConvertContext(t *testing.T) { diff --git a/ecs/aws.go b/ecs/aws.go index 83156b227..80234b38f 100644 --- a/ecs/aws.go +++ b/ecs/aws.go @@ -21,6 +21,7 @@ import ( "github.com/aws/aws-sdk-go/service/cloudformation" "github.com/aws/aws-sdk-go/service/ecs" + "github.com/docker/compose-cli/api/compose" "github.com/docker/compose-cli/api/secrets" ) diff --git a/ecs/aws_mock.go b/ecs/aws_mock.go index 6d7ef4f6f..1ed432d10 100644 --- a/ecs/aws_mock.go +++ b/ecs/aws_mock.go @@ -6,12 +6,14 @@ package ecs import ( context "context" + reflect "reflect" + cloudformation "github.com/aws/aws-sdk-go/service/cloudformation" ecs "github.com/aws/aws-sdk-go/service/ecs" + gomock "github.com/golang/mock/gomock" + compose "github.com/docker/compose-cli/api/compose" secrets "github.com/docker/compose-cli/api/secrets" - gomock "github.com/golang/mock/gomock" - reflect "reflect" ) // MockAPI is a mock of API interface diff --git a/ecs/backend.go b/ecs/backend.go index 540b414e3..a9bbffb1a 100644 --- a/ecs/backend.go +++ b/ecs/backend.go @@ -22,13 +22,13 @@ import ( "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/containers" "github.com/docker/compose-cli/api/resources" "github.com/docker/compose-cli/api/secrets" "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/context/store" "github.com/docker/compose-cli/errdefs" diff --git a/ecs/local/backend.go b/ecs/local/backend.go index 9946f2044..ce9876db4 100644 --- a/ecs/local/backend.go +++ b/ecs/local/backend.go @@ -24,12 +24,12 @@ import ( "github.com/docker/docker/client" "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/containers" "github.com/docker/compose-cli/api/resources" "github.com/docker/compose-cli/api/secrets" "github.com/docker/compose-cli/api/volumes" - "github.com/docker/compose-cli/api/cloud" "github.com/docker/compose-cli/context/store" ) diff --git a/ecs/local/compose.go b/ecs/local/compose.go index d5c9728fd..b534a8193 100644 --- a/ecs/local/compose.go +++ b/ecs/local/compose.go @@ -25,10 +25,11 @@ import ( "github.com/aws/aws-sdk-go/aws" "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/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 { diff --git a/ecs/run.go b/ecs/run.go index 6e3f8bf9a..13a7f34e5 100644 --- a/ecs/run.go +++ b/ecs/run.go @@ -20,6 +20,7 @@ import ( "context" "github.com/compose-spec/compose-go/types" + "github.com/docker/compose-cli/api/compose" "github.com/docker/compose-cli/errdefs" ) diff --git a/ecs/tags.go b/ecs/tags.go index 01dead2f2..6e7206ee6 100644 --- a/ecs/tags.go +++ b/ecs/tags.go @@ -19,6 +19,7 @@ package ecs import ( "github.com/awslabs/goformation/v4/cloudformation/tags" "github.com/compose-spec/compose-go/types" + "github.com/docker/compose-cli/api/compose" ) diff --git a/example/backend.go b/example/backend.go index a65d14058..e0f4df489 100644 --- a/example/backend.go +++ b/example/backend.go @@ -24,12 +24,12 @@ import ( "fmt" "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/containers" "github.com/docker/compose-cli/api/resources" "github.com/docker/compose-cli/api/secrets" "github.com/docker/compose-cli/api/volumes" - "github.com/docker/compose-cli/api/cloud" "github.com/docker/compose-cli/errdefs" "github.com/compose-spec/compose-go/types" diff --git a/local/backend.go b/local/backend.go index cadb58bd4..0e5ea277e 100644 --- a/local/backend.go +++ b/local/backend.go @@ -22,12 +22,12 @@ import ( "github.com/docker/docker/client" "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/containers" "github.com/docker/compose-cli/api/resources" "github.com/docker/compose-cli/api/secrets" "github.com/docker/compose-cli/api/volumes" - "github.com/docker/compose-cli/api/cloud" local_compose "github.com/docker/compose-cli/local/compose" ) diff --git a/local/compose/convergence.go b/local/compose/convergence.go index 3bed77a37..f5f98e2a6 100644 --- a/local/compose/convergence.go +++ b/local/compose/convergence.go @@ -28,8 +28,8 @@ import ( "github.com/docker/docker/api/types/network" "golang.org/x/sync/errgroup" - status "github.com/docker/compose-cli/local/moby" "github.com/docker/compose-cli/api/progress" + status "github.com/docker/compose-cli/local/moby" ) const ( diff --git a/local/compose/create.go b/local/compose/create.go index 221d515ec..84ea697d8 100644 --- a/local/compose/create.go +++ b/local/compose/create.go @@ -38,8 +38,8 @@ import ( "golang.org/x/sync/errgroup" "github.com/docker/compose-cli/api/compose" - convert "github.com/docker/compose-cli/local/moby" "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 { diff --git a/local/compose/pull.go b/local/compose/pull.go index c1e7591ad..e4beae823 100644 --- a/local/compose/pull.go +++ b/local/compose/pull.go @@ -32,8 +32,8 @@ import ( "github.com/docker/docker/registry" "golang.org/x/sync/errgroup" - "github.com/docker/compose-cli/config" "github.com/docker/compose-cli/api/progress" + "github.com/docker/compose-cli/config" ) func (s *composeService) Pull(ctx context.Context, project *types.Project) error { diff --git a/local/compose/push.go b/local/compose/push.go index 6a3cd2f70..bb52a8dab 100644 --- a/local/compose/push.go +++ b/local/compose/push.go @@ -25,8 +25,8 @@ import ( "github.com/docker/buildx/driver" - "github.com/docker/compose-cli/config" "github.com/docker/compose-cli/api/progress" + "github.com/docker/compose-cli/config" "github.com/compose-spec/compose-go/types" cliconfig "github.com/docker/cli/cli/config" diff --git a/prompt/prompt_mock.go b/prompt/prompt_mock.go index 06886e0fb..b2f2ea7c4 100644 --- a/prompt/prompt_mock.go +++ b/prompt/prompt_mock.go @@ -5,8 +5,9 @@ package prompt import ( - gomock "github.com/golang/mock/gomock" reflect "reflect" + + gomock "github.com/golang/mock/gomock" ) // MockUI is a mock of UI interface