From d26a23ceb834757e4ef522625809af4be7ed447f Mon Sep 17 00:00:00 2001 From: Tibor Vass Date: Mon, 27 Mar 2017 18:21:59 -0700 Subject: [PATCH] Manually reorganize import paths to segregate stdlib and 3rd-party packages Signed-off-by: Tibor Vass --- command/cli.go | 2 +- command/container/attach.go | 2 +- command/container/diff.go | 2 +- command/container/export.go | 2 +- command/container/kill.go | 2 +- command/container/pause.go | 2 +- command/container/restart.go | 2 +- command/container/rm.go | 2 +- command/container/run.go | 2 +- command/container/stats.go | 2 +- command/container/stats_helpers.go | 2 +- command/container/stop.go | 2 +- command/container/unpause.go | 2 +- command/container/update.go | 2 +- command/container/wait.go | 2 +- command/image/pull.go | 5 ++--- command/image/save.go | 5 ++--- command/in.go | 2 +- command/swarm/join_token.go | 5 ++--- command/swarm/unlock.go | 7 +++---- 20 files changed, 25 insertions(+), 29 deletions(-) diff --git a/command/cli.go b/command/cli.go index 9db5d8d0f5..e2a89eb0b2 100644 --- a/command/cli.go +++ b/command/cli.go @@ -2,7 +2,6 @@ package command import ( "fmt" - "github.com/pkg/errors" "io" "net/http" "os" @@ -21,6 +20,7 @@ import ( dopts "github.com/docker/docker/opts" "github.com/docker/go-connections/sockets" "github.com/docker/go-connections/tlsconfig" + "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/net/context" ) diff --git a/command/container/attach.go b/command/container/attach.go index 7d2869f76c..d37cc73603 100644 --- a/command/container/attach.go +++ b/command/container/attach.go @@ -1,7 +1,6 @@ package container import ( - "github.com/pkg/errors" "io" "net/http/httputil" @@ -10,6 +9,7 @@ import ( "github.com/docker/docker/cli" "github.com/docker/docker/cli/command" "github.com/docker/docker/pkg/signal" + "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/net/context" ) diff --git a/command/container/diff.go b/command/container/diff.go index c279c4849c..95926f5867 100644 --- a/command/container/diff.go +++ b/command/container/diff.go @@ -2,11 +2,11 @@ package container import ( "fmt" - "github.com/pkg/errors" "github.com/docker/docker/cli" "github.com/docker/docker/cli/command" "github.com/docker/docker/pkg/archive" + "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/net/context" ) diff --git a/command/container/export.go b/command/container/export.go index dfb514440e..cb0ddfe7a7 100644 --- a/command/container/export.go +++ b/command/container/export.go @@ -1,11 +1,11 @@ package container import ( - "github.com/pkg/errors" "io" "github.com/docker/docker/cli" "github.com/docker/docker/cli/command" + "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/net/context" ) diff --git a/command/container/kill.go b/command/container/kill.go index 32eea6c0b6..4cc3ee0fcb 100644 --- a/command/container/kill.go +++ b/command/container/kill.go @@ -2,11 +2,11 @@ package container import ( "fmt" - "github.com/pkg/errors" "strings" "github.com/docker/docker/cli" "github.com/docker/docker/cli/command" + "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/net/context" ) diff --git a/command/container/pause.go b/command/container/pause.go index 742d6d5560..095a0db2c2 100644 --- a/command/container/pause.go +++ b/command/container/pause.go @@ -2,11 +2,11 @@ package container import ( "fmt" - "github.com/pkg/errors" "strings" "github.com/docker/docker/cli" "github.com/docker/docker/cli/command" + "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/net/context" ) diff --git a/command/container/restart.go b/command/container/restart.go index 7cfc9c0eab..73cd2507ee 100644 --- a/command/container/restart.go +++ b/command/container/restart.go @@ -2,12 +2,12 @@ package container import ( "fmt" - "github.com/pkg/errors" "strings" "time" "github.com/docker/docker/cli" "github.com/docker/docker/cli/command" + "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/net/context" ) diff --git a/command/container/rm.go b/command/container/rm.go index 7e6fd4588b..887b5c5d34 100644 --- a/command/container/rm.go +++ b/command/container/rm.go @@ -2,12 +2,12 @@ package container import ( "fmt" - "github.com/pkg/errors" "strings" "github.com/docker/docker/api/types" "github.com/docker/docker/cli" "github.com/docker/docker/cli/command" + "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/net/context" ) diff --git a/command/container/run.go b/command/container/run.go index 4fd05c74bb..bab6a9cf13 100644 --- a/command/container/run.go +++ b/command/container/run.go @@ -2,7 +2,6 @@ package container import ( "fmt" - "github.com/pkg/errors" "io" "net/http/httputil" "os" @@ -18,6 +17,7 @@ import ( "github.com/docker/docker/pkg/promise" "github.com/docker/docker/pkg/signal" "github.com/docker/libnetwork/resolvconf/dns" + "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" "golang.org/x/net/context" diff --git a/command/container/stats.go b/command/container/stats.go index 9d2d59a5b4..c420e8151e 100644 --- a/command/container/stats.go +++ b/command/container/stats.go @@ -2,7 +2,6 @@ package container import ( "fmt" - "github.com/pkg/errors" "io" "strings" "sync" @@ -14,6 +13,7 @@ import ( "github.com/docker/docker/cli" "github.com/docker/docker/cli/command" "github.com/docker/docker/cli/command/formatter" + "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/net/context" ) diff --git a/command/container/stats_helpers.go b/command/container/stats_helpers.go index 8f7a924f2d..5cbcf03e40 100644 --- a/command/container/stats_helpers.go +++ b/command/container/stats_helpers.go @@ -2,7 +2,6 @@ package container import ( "encoding/json" - "github.com/pkg/errors" "io" "strings" "sync" @@ -12,6 +11,7 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/cli/command/formatter" "github.com/docker/docker/client" + "github.com/pkg/errors" "golang.org/x/net/context" ) diff --git a/command/container/stop.go b/command/container/stop.go index cba20c77ae..32729e1eae 100644 --- a/command/container/stop.go +++ b/command/container/stop.go @@ -2,12 +2,12 @@ package container import ( "fmt" - "github.com/pkg/errors" "strings" "time" "github.com/docker/docker/cli" "github.com/docker/docker/cli/command" + "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/net/context" ) diff --git a/command/container/unpause.go b/command/container/unpause.go index 1842991540..8105b17551 100644 --- a/command/container/unpause.go +++ b/command/container/unpause.go @@ -2,11 +2,11 @@ package container import ( "fmt" - "github.com/pkg/errors" "strings" "github.com/docker/docker/cli" "github.com/docker/docker/cli/command" + "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/net/context" ) diff --git a/command/container/update.go b/command/container/update.go index 22b2863974..283cd3314e 100644 --- a/command/container/update.go +++ b/command/container/update.go @@ -2,7 +2,6 @@ package container import ( "fmt" - "github.com/pkg/errors" "strings" containertypes "github.com/docker/docker/api/types/container" @@ -10,6 +9,7 @@ import ( "github.com/docker/docker/cli/command" "github.com/docker/docker/opts" runconfigopts "github.com/docker/docker/runconfig/opts" + "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/net/context" ) diff --git a/command/container/wait.go b/command/container/wait.go index 9b46318f5b..f978207b94 100644 --- a/command/container/wait.go +++ b/command/container/wait.go @@ -2,11 +2,11 @@ package container import ( "fmt" - "github.com/pkg/errors" "strings" "github.com/docker/docker/cli" "github.com/docker/docker/cli/command" + "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/net/context" ) diff --git a/command/image/pull.go b/command/image/pull.go index 2c702e898c..5dd523c6d1 100644 --- a/command/image/pull.go +++ b/command/image/pull.go @@ -2,16 +2,15 @@ package image import ( "fmt" - "github.com/pkg/errors" "strings" - "golang.org/x/net/context" - "github.com/docker/distribution/reference" "github.com/docker/docker/cli" "github.com/docker/docker/cli/command" "github.com/docker/docker/registry" + "github.com/pkg/errors" "github.com/spf13/cobra" + "golang.org/x/net/context" ) type pullOptions struct { diff --git a/command/image/save.go b/command/image/save.go index f475f17ff2..e01d2c7302 100644 --- a/command/image/save.go +++ b/command/image/save.go @@ -1,14 +1,13 @@ package image import ( - "github.com/pkg/errors" "io" - "golang.org/x/net/context" - "github.com/docker/docker/cli" "github.com/docker/docker/cli/command" + "github.com/pkg/errors" "github.com/spf13/cobra" + "golang.org/x/net/context" ) type saveOptions struct { diff --git a/command/in.go b/command/in.go index d12af6fd96..50de77ee9b 100644 --- a/command/in.go +++ b/command/in.go @@ -1,12 +1,12 @@ package command import ( - "github.com/pkg/errors" "io" "os" "runtime" "github.com/docker/docker/pkg/term" + "github.com/pkg/errors" ) // InStream is an input stream used by the DockerCli to read user input diff --git a/command/swarm/join_token.go b/command/swarm/join_token.go index 006ea07c3f..dc69e909e0 100644 --- a/command/swarm/join_token.go +++ b/command/swarm/join_token.go @@ -2,13 +2,12 @@ package swarm import ( "fmt" - "github.com/pkg/errors" - - "github.com/spf13/cobra" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/cli" "github.com/docker/docker/cli/command" + "github.com/pkg/errors" + "github.com/spf13/cobra" "golang.org/x/net/context" ) diff --git a/command/swarm/unlock.go b/command/swarm/unlock.go index bb3068f1ef..c1d9b99189 100644 --- a/command/swarm/unlock.go +++ b/command/swarm/unlock.go @@ -3,16 +3,15 @@ package swarm import ( "bufio" "fmt" - "github.com/pkg/errors" "io" "strings" - "github.com/spf13/cobra" - "golang.org/x/crypto/ssh/terminal" - "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/cli" "github.com/docker/docker/cli/command" + "github.com/pkg/errors" + "github.com/spf13/cobra" + "golang.org/x/crypto/ssh/terminal" "golang.org/x/net/context" )