浏览代码

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

Signed-off-by: Guillaume Tardif <[email protected]>
Guillaume Tardif 4 年之前
父节点
当前提交
930ae8bdb2

+ 1 - 1
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 {

+ 1 - 1
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"
 )
 

+ 1 - 1
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 {

+ 1 - 1
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"
 )
 

+ 1 - 1
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"
 )
 

+ 1 - 1
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"

+ 3 - 2
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() {

+ 1 - 1
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

+ 1 - 1
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"

+ 3 - 2
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 (

+ 3 - 2
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 (

+ 3 - 2
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 (

+ 3 - 2
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 (

+ 3 - 2
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 (

+ 2 - 1
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) {

+ 1 - 0
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"
 )

+ 4 - 2
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

+ 1 - 1
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"
 

+ 1 - 1
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"
 )
 

+ 3 - 2
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 {

+ 1 - 0
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"
 )

+ 1 - 0
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"
 )
 

+ 1 - 1
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"

+ 1 - 1
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"
 )
 

+ 1 - 1
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 (

+ 1 - 1
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 {

+ 1 - 1
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 {

+ 1 - 1
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"

+ 2 - 1
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