From 6f8070deb2207aa255fd2ae8a1e305e3d79797f6 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Thu, 3 May 2018 18:02:44 -0700 Subject: [PATCH] Switch from x/net/context to context Since go 1.7, "context" is a standard package. Since go 1.9, x/net/context merely provides some types aliased to those in the standard context package. The changes were performed by the following script: for f in $(git ls-files \*.go | grep -v ^vendor/); do sed -i 's|golang.org/x/net/context|context|' $f goimports -w $f for i in 1 2; do awk '/^$/ {e=1; next;} /\t"context"$/ {e=0;} {if (e) {print ""; e=0}; print;}' < $f > $f.new && \ mv $f.new $f goimports -w $f done done [v2: do awk/goimports fixup twice] Signed-off-by: Kir Kolyshkin --- cli/command/checkpoint/client_test.go | 3 ++- cli/command/checkpoint/create.go | 3 +-- cli/command/checkpoint/list.go | 2 +- cli/command/checkpoint/remove.go | 2 +- cli/command/cli.go | 2 +- cli/command/cli_test.go | 2 +- cli/command/config/client_test.go | 3 ++- cli/command/config/create.go | 2 +- cli/command/config/inspect.go | 2 +- cli/command/config/ls.go | 2 +- cli/command/config/remove.go | 2 +- cli/command/container/attach.go | 2 +- cli/command/container/client_test.go | 2 +- cli/command/container/commit.go | 2 +- cli/command/container/cp.go | 2 +- cli/command/container/create.go | 2 +- cli/command/container/diff.go | 3 ++- cli/command/container/exec.go | 2 +- cli/command/container/exec_test.go | 2 +- cli/command/container/export.go | 2 +- cli/command/container/hijack.go | 2 +- cli/command/container/inspect.go | 3 ++- cli/command/container/kill.go | 2 +- cli/command/container/list.go | 2 +- cli/command/container/logs.go | 2 +- cli/command/container/pause.go | 2 +- cli/command/container/port.go | 2 +- cli/command/container/prune.go | 2 +- cli/command/container/rename.go | 2 +- cli/command/container/restart.go | 2 +- cli/command/container/rm.go | 2 +- cli/command/container/run.go | 2 +- cli/command/container/start.go | 2 +- cli/command/container/stats.go | 2 +- cli/command/container/stats_helpers.go | 2 +- cli/command/container/stop.go | 2 +- cli/command/container/top.go | 2 +- cli/command/container/tty.go | 2 +- cli/command/container/unpause.go | 2 +- cli/command/container/update.go | 2 +- cli/command/container/utils.go | 2 +- cli/command/container/utils_test.go | 2 +- cli/command/container/wait.go | 2 +- cli/command/idresolver/client_test.go | 3 ++- cli/command/idresolver/idresolver.go | 2 +- cli/command/idresolver/idresolver_test.go | 3 ++- cli/command/image/build.go | 2 +- cli/command/image/build_test.go | 2 +- cli/command/image/client_test.go | 2 +- cli/command/image/history.go | 2 +- cli/command/image/import.go | 2 +- cli/command/image/inspect.go | 2 +- cli/command/image/list.go | 3 ++- cli/command/image/load.go | 3 +-- cli/command/image/prune.go | 3 +-- cli/command/image/pull.go | 2 +- cli/command/image/push.go | 2 +- cli/command/image/remove.go | 3 +-- cli/command/image/save.go | 2 +- cli/command/image/tag.go | 2 +- cli/command/image/trust.go | 2 +- cli/command/manifest/client_test.go | 3 ++- cli/command/manifest/create_list.go | 2 +- cli/command/manifest/create_test.go | 2 +- cli/command/manifest/inspect.go | 2 +- cli/command/manifest/inspect_test.go | 2 +- cli/command/manifest/push.go | 2 +- cli/command/manifest/push_test.go | 2 +- cli/command/manifest/util.go | 3 ++- cli/command/network/client_test.go | 3 ++- cli/command/network/connect.go | 3 ++- cli/command/network/connect_test.go | 2 +- cli/command/network/create.go | 2 +- cli/command/network/create_test.go | 2 +- cli/command/network/disconnect.go | 2 +- cli/command/network/disconnect_test.go | 2 +- cli/command/network/inspect.go | 2 +- cli/command/network/list.go | 2 +- cli/command/network/list_test.go | 2 +- cli/command/network/prune.go | 2 +- cli/command/network/remove.go | 3 +-- cli/command/node/client_test.go | 3 ++- cli/command/node/cmd.go | 2 +- cli/command/node/inspect.go | 2 +- cli/command/node/list.go | 2 +- cli/command/node/ps.go | 2 +- cli/command/node/remove.go | 3 +-- cli/command/node/update.go | 2 +- cli/command/plugin/client_test.go | 2 +- cli/command/plugin/create.go | 2 +- cli/command/plugin/disable.go | 2 +- cli/command/plugin/enable.go | 2 +- cli/command/plugin/inspect.go | 3 ++- cli/command/plugin/install.go | 2 +- cli/command/plugin/list.go | 3 ++- cli/command/plugin/push.go | 2 +- cli/command/plugin/remove.go | 2 +- cli/command/plugin/set.go | 2 +- cli/command/registry.go | 2 +- cli/command/registry/login.go | 3 +-- cli/command/registry/login_test.go | 2 +- cli/command/registry/logout.go | 3 +-- cli/command/registry/search.go | 2 +- cli/command/registry_test.go | 2 +- cli/command/secret/client_test.go | 3 ++- cli/command/secret/create.go | 2 +- cli/command/secret/inspect.go | 2 +- cli/command/secret/ls.go | 2 +- cli/command/secret/remove.go | 2 +- cli/command/service/client_test.go | 3 ++- cli/command/service/create.go | 2 +- cli/command/service/helpers.go | 2 +- cli/command/service/inspect.go | 3 +-- cli/command/service/list.go | 2 +- cli/command/service/list_test.go | 2 +- cli/command/service/logs.go | 3 +-- cli/command/service/opts.go | 2 +- cli/command/service/parse.go | 3 ++- cli/command/service/progress/progress.go | 2 +- cli/command/service/ps.go | 2 +- cli/command/service/ps_test.go | 2 +- cli/command/service/remove.go | 2 +- cli/command/service/rollback_test.go | 2 +- cli/command/service/scale.go | 3 +-- cli/command/service/trust.go | 2 +- cli/command/service/update.go | 2 +- cli/command/service/update_test.go | 2 +- cli/command/stack/client_test.go | 2 +- cli/command/stack/swarm/client_test.go | 2 +- cli/command/stack/swarm/common.go | 3 ++- cli/command/stack/swarm/deploy.go | 2 +- cli/command/stack/swarm/deploy_bundlefile.go | 3 +-- cli/command/stack/swarm/deploy_composefile.go | 2 +- cli/command/stack/swarm/deploy_composefile_test.go | 2 +- cli/command/stack/swarm/deploy_test.go | 2 +- cli/command/stack/swarm/list.go | 2 +- cli/command/stack/swarm/ps.go | 2 +- cli/command/stack/swarm/remove.go | 2 +- cli/command/stack/swarm/services.go | 2 +- cli/command/swarm/ca.go | 2 +- cli/command/swarm/client_test.go | 3 ++- cli/command/swarm/init.go | 3 +-- cli/command/swarm/join.go | 3 +-- cli/command/swarm/join_token.go | 2 +- cli/command/swarm/leave.go | 3 +-- cli/command/swarm/progress/root_rotation.go | 3 +-- cli/command/swarm/unlock.go | 2 +- cli/command/swarm/unlock_key.go | 2 +- cli/command/swarm/update.go | 3 +-- cli/command/system/client_test.go | 3 ++- cli/command/system/df.go | 2 +- cli/command/system/events.go | 2 +- cli/command/system/info.go | 2 +- cli/command/system/inspect.go | 2 +- cli/command/system/prune.go | 2 +- cli/command/system/version.go | 2 +- cli/command/system/version_test.go | 2 +- cli/command/task/client_test.go | 3 ++- cli/command/task/print.go | 2 +- cli/command/task/print_test.go | 2 +- cli/command/volume/client_test.go | 3 ++- cli/command/volume/create.go | 2 +- cli/command/volume/inspect.go | 3 ++- cli/command/volume/list.go | 2 +- cli/command/volume/prune.go | 2 +- cli/command/volume/remove.go | 2 +- cli/compose/convert/service_test.go | 2 +- cli/registry/client/client.go | 2 +- cli/registry/client/fetcher.go | 2 +- cli/trust/trust.go | 2 +- internal/test/network/client.go | 3 ++- 171 files changed, 195 insertions(+), 188 deletions(-) diff --git a/cli/command/checkpoint/client_test.go b/cli/command/checkpoint/client_test.go index ca91719617..c8fe190e83 100644 --- a/cli/command/checkpoint/client_test.go +++ b/cli/command/checkpoint/client_test.go @@ -1,9 +1,10 @@ package checkpoint import ( + "context" + "github.com/docker/docker/api/types" "github.com/docker/docker/client" - "golang.org/x/net/context" ) type fakeClient struct { diff --git a/cli/command/checkpoint/create.go b/cli/command/checkpoint/create.go index 974b44ab83..45b4bd6308 100644 --- a/cli/command/checkpoint/create.go +++ b/cli/command/checkpoint/create.go @@ -1,10 +1,9 @@ package checkpoint import ( + "context" "fmt" - "golang.org/x/net/context" - "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/docker/api/types" diff --git a/cli/command/checkpoint/list.go b/cli/command/checkpoint/list.go index 758aa69936..7b041cfe89 100644 --- a/cli/command/checkpoint/list.go +++ b/cli/command/checkpoint/list.go @@ -1,7 +1,7 @@ package checkpoint import ( - "golang.org/x/net/context" + "context" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" diff --git a/cli/command/checkpoint/remove.go b/cli/command/checkpoint/remove.go index 298adbaef7..3f89442163 100644 --- a/cli/command/checkpoint/remove.go +++ b/cli/command/checkpoint/remove.go @@ -1,7 +1,7 @@ package checkpoint import ( - "golang.org/x/net/context" + "context" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" diff --git a/cli/command/cli.go b/cli/command/cli.go index 55a6c436d4..8203095682 100644 --- a/cli/command/cli.go +++ b/cli/command/cli.go @@ -1,6 +1,7 @@ package command import ( + "context" "io" "net" "net/http" @@ -28,7 +29,6 @@ import ( "github.com/theupdateframework/notary" notaryclient "github.com/theupdateframework/notary/client" "github.com/theupdateframework/notary/passphrase" - "golang.org/x/net/context" ) // Streams is an interface which exposes the standard input and output streams diff --git a/cli/command/cli_test.go b/cli/command/cli_test.go index d8ac647dfa..36d6f098ec 100644 --- a/cli/command/cli_test.go +++ b/cli/command/cli_test.go @@ -1,6 +1,7 @@ package command import ( + "context" "crypto/x509" "os" "runtime" @@ -17,7 +18,6 @@ import ( "github.com/gotestyourself/gotestyourself/env" "github.com/gotestyourself/gotestyourself/fs" "github.com/pkg/errors" - "golang.org/x/net/context" ) func TestNewAPIClientFromFlags(t *testing.T) { diff --git a/cli/command/config/client_test.go b/cli/command/config/client_test.go index fdb1321847..2e19b77521 100644 --- a/cli/command/config/client_test.go +++ b/cli/command/config/client_test.go @@ -1,10 +1,11 @@ package config import ( + "context" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" - "golang.org/x/net/context" ) type fakeClient struct { diff --git a/cli/command/config/create.go b/cli/command/config/create.go index eb9f3c78aa..04130313e6 100644 --- a/cli/command/config/create.go +++ b/cli/command/config/create.go @@ -1,6 +1,7 @@ package config import ( + "context" "fmt" "io" "io/ioutil" @@ -12,7 +13,6 @@ import ( "github.com/docker/docker/pkg/system" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type createOptions struct { diff --git a/cli/command/config/inspect.go b/cli/command/config/inspect.go index 6976e5a079..d1515ec962 100644 --- a/cli/command/config/inspect.go +++ b/cli/command/config/inspect.go @@ -1,6 +1,7 @@ package config import ( + "context" "fmt" "strings" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/formatter" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type inspectOptions struct { diff --git a/cli/command/config/ls.go b/cli/command/config/ls.go index 9d1673b62c..dd2d89edb6 100644 --- a/cli/command/config/ls.go +++ b/cli/command/config/ls.go @@ -1,6 +1,7 @@ package config import ( + "context" "sort" "github.com/docker/cli/cli" @@ -10,7 +11,6 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/spf13/cobra" - "golang.org/x/net/context" "vbom.ml/util/sortorder" ) diff --git a/cli/command/config/remove.go b/cli/command/config/remove.go index c8eac11af1..3240a5a3de 100644 --- a/cli/command/config/remove.go +++ b/cli/command/config/remove.go @@ -1,6 +1,7 @@ package config import ( + "context" "fmt" "strings" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/cli/command" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type removeOptions struct { diff --git a/cli/command/container/attach.go b/cli/command/container/attach.go index dca84d5ddb..de96a3b7d8 100644 --- a/cli/command/container/attach.go +++ b/cli/command/container/attach.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "io" "net/http/httputil" @@ -14,7 +15,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type attachOptions struct { diff --git a/cli/command/container/client_test.go b/cli/command/container/client_test.go index ed04920b16..a2c39bc6ff 100644 --- a/cli/command/container/client_test.go +++ b/cli/command/container/client_test.go @@ -1,13 +1,13 @@ package container import ( + "context" "io" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/container" "github.com/docker/docker/api/types/network" "github.com/docker/docker/client" - "golang.org/x/net/context" ) type fakeClient struct { diff --git a/cli/command/container/commit.go b/cli/command/container/commit.go index 6fc5277645..0a30f55d45 100644 --- a/cli/command/container/commit.go +++ b/cli/command/container/commit.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "github.com/docker/cli/cli" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/opts" "github.com/docker/docker/api/types" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type commitOptions struct { diff --git a/cli/command/container/cp.go b/cli/command/container/cp.go index 398917aae0..ffb9a211c2 100644 --- a/cli/command/container/cp.go +++ b/cli/command/container/cp.go @@ -1,6 +1,7 @@ package container import ( + "context" "io" "os" "path/filepath" @@ -13,7 +14,6 @@ import ( "github.com/docker/docker/pkg/system" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type copyOptions struct { diff --git a/cli/command/container/create.go b/cli/command/container/create.go index 7fe4c8f260..62d1a088aa 100644 --- a/cli/command/container/create.go +++ b/cli/command/container/create.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "io" "os" @@ -17,7 +18,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" - "golang.org/x/net/context" ) type createOptions struct { diff --git a/cli/command/container/diff.go b/cli/command/container/diff.go index 04b4a8c431..39b71c8062 100644 --- a/cli/command/container/diff.go +++ b/cli/command/container/diff.go @@ -1,12 +1,13 @@ package container import ( + "context" + "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/formatter" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type diffOptions struct { diff --git a/cli/command/container/exec.go b/cli/command/container/exec.go index 258f3a860a..c96f405594 100644 --- a/cli/command/container/exec.go +++ b/cli/command/container/exec.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "io" @@ -13,7 +14,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type execOptions struct { diff --git a/cli/command/container/exec_test.go b/cli/command/container/exec_test.go index d40c74fff3..b4012a34c0 100644 --- a/cli/command/container/exec_test.go +++ b/cli/command/container/exec_test.go @@ -1,6 +1,7 @@ package container import ( + "context" "io/ioutil" "testing" @@ -12,7 +13,6 @@ import ( "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/pkg/errors" - "golang.org/x/net/context" ) func withDefaultOpts(options execOptions) execOptions { diff --git a/cli/command/container/export.go b/cli/command/container/export.go index dc2d586def..f0f67373d7 100644 --- a/cli/command/container/export.go +++ b/cli/command/container/export.go @@ -1,13 +1,13 @@ package container import ( + "context" "io" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type exportOptions struct { diff --git a/cli/command/container/hijack.go b/cli/command/container/hijack.go index b3ca2e6ad5..78fbebe017 100644 --- a/cli/command/container/hijack.go +++ b/cli/command/container/hijack.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "io" "runtime" @@ -12,7 +13,6 @@ import ( "github.com/docker/docker/pkg/stdcopy" "github.com/docker/docker/pkg/term" "github.com/sirupsen/logrus" - "golang.org/x/net/context" ) // The default escape key sequence: ctrl-p, ctrl-q diff --git a/cli/command/container/inspect.go b/cli/command/container/inspect.go index feaf2d13d7..4f50e2a080 100644 --- a/cli/command/container/inspect.go +++ b/cli/command/container/inspect.go @@ -1,11 +1,12 @@ package container import ( + "context" + "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/inspect" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type inspectOptions struct { diff --git a/cli/command/container/kill.go b/cli/command/container/kill.go index c4625b71b2..feedbc0111 100644 --- a/cli/command/container/kill.go +++ b/cli/command/container/kill.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "strings" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/cli/command" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type killOptions struct { diff --git a/cli/command/container/list.go b/cli/command/container/list.go index bb27c1687c..a79507e792 100644 --- a/cli/command/container/list.go +++ b/cli/command/container/list.go @@ -1,6 +1,7 @@ package container import ( + "context" "io/ioutil" "github.com/docker/cli/cli" @@ -10,7 +11,6 @@ import ( "github.com/docker/cli/templates" "github.com/docker/docker/api/types" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type psOptions struct { diff --git a/cli/command/container/logs.go b/cli/command/container/logs.go index d8a7650074..b5b526f2e2 100644 --- a/cli/command/container/logs.go +++ b/cli/command/container/logs.go @@ -1,6 +1,7 @@ package container import ( + "context" "io" "github.com/docker/cli/cli" @@ -8,7 +9,6 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/pkg/stdcopy" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type logsOptions struct { diff --git a/cli/command/container/pause.go b/cli/command/container/pause.go index 748901ac7d..1118b7f0d4 100644 --- a/cli/command/container/pause.go +++ b/cli/command/container/pause.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "strings" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/cli/command" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type pauseOptions struct { diff --git a/cli/command/container/port.go b/cli/command/container/port.go index 5aafd34977..83e16a98b7 100644 --- a/cli/command/container/port.go +++ b/cli/command/container/port.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "strings" @@ -9,7 +10,6 @@ import ( "github.com/docker/go-connections/nat" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type portOptions struct { diff --git a/cli/command/container/prune.go b/cli/command/container/prune.go index e144d8d7ea..ba5f805534 100644 --- a/cli/command/container/prune.go +++ b/cli/command/container/prune.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "github.com/docker/cli/cli" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/opts" units "github.com/docker/go-units" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type pruneOptions struct { diff --git a/cli/command/container/rename.go b/cli/command/container/rename.go index b24c6f3fc3..bc58ea2029 100644 --- a/cli/command/container/rename.go +++ b/cli/command/container/rename.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "strings" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/cli/command" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type renameOptions struct { diff --git a/cli/command/container/restart.go b/cli/command/container/restart.go index a05e3b12dd..6e02ee46d1 100644 --- a/cli/command/container/restart.go +++ b/cli/command/container/restart.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "strings" "time" @@ -9,7 +10,6 @@ import ( "github.com/docker/cli/cli/command" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type restartOptions struct { diff --git a/cli/command/container/rm.go b/cli/command/container/rm.go index 16db5501e0..2dcd4b6ace 100644 --- a/cli/command/container/rm.go +++ b/cli/command/container/rm.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "strings" @@ -9,7 +10,6 @@ import ( "github.com/docker/docker/api/types" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type rmOptions struct { diff --git a/cli/command/container/run.go b/cli/command/container/run.go index 5458f58f1a..02ff715259 100644 --- a/cli/command/container/run.go +++ b/cli/command/container/run.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "io" "net/http/httputil" @@ -21,7 +22,6 @@ import ( "github.com/sirupsen/logrus" "github.com/spf13/cobra" "github.com/spf13/pflag" - "golang.org/x/net/context" ) type runOptions struct { diff --git a/cli/command/container/start.go b/cli/command/container/start.go index 67b3bd509c..2617e489f5 100644 --- a/cli/command/container/start.go +++ b/cli/command/container/start.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "io" "net/http/httputil" @@ -13,7 +14,6 @@ import ( "github.com/docker/docker/pkg/term" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type startOptions struct { diff --git a/cli/command/container/stats.go b/cli/command/container/stats.go index d57e15de72..4efcb19e65 100644 --- a/cli/command/container/stats.go +++ b/cli/command/container/stats.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "io" "strings" @@ -15,7 +16,6 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type statsOptions struct { diff --git a/cli/command/container/stats_helpers.go b/cli/command/container/stats_helpers.go index df5a048a0b..2300ce5c43 100644 --- a/cli/command/container/stats_helpers.go +++ b/cli/command/container/stats_helpers.go @@ -1,6 +1,7 @@ package container import ( + "context" "encoding/json" "io" "strings" @@ -12,7 +13,6 @@ import ( "github.com/docker/docker/client" "github.com/pkg/errors" "github.com/sirupsen/logrus" - "golang.org/x/net/context" ) type stats struct { diff --git a/cli/command/container/stop.go b/cli/command/container/stop.go index 10ffabf07c..e299175436 100644 --- a/cli/command/container/stop.go +++ b/cli/command/container/stop.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "strings" "time" @@ -9,7 +10,6 @@ import ( "github.com/docker/cli/cli/command" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type stopOptions struct { diff --git a/cli/command/container/top.go b/cli/command/container/top.go index 86155da7eb..526e1a5a0c 100644 --- a/cli/command/container/top.go +++ b/cli/command/container/top.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "strings" "text/tabwriter" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type topOptions struct { diff --git a/cli/command/container/tty.go b/cli/command/container/tty.go index a023778364..cb49ded8ef 100644 --- a/cli/command/container/tty.go +++ b/cli/command/container/tty.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "os" gosignal "os/signal" @@ -12,7 +13,6 @@ import ( "github.com/docker/docker/client" "github.com/docker/docker/pkg/signal" "github.com/sirupsen/logrus" - "golang.org/x/net/context" ) // resizeTtyTo resizes tty to specific height and width diff --git a/cli/command/container/unpause.go b/cli/command/container/unpause.go index daaa0b707d..7af4547fdb 100644 --- a/cli/command/container/unpause.go +++ b/cli/command/container/unpause.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "strings" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/cli/command" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type unpauseOptions struct { diff --git a/cli/command/container/update.go b/cli/command/container/update.go index b91d77dcbc..d641a50355 100644 --- a/cli/command/container/update.go +++ b/cli/command/container/update.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "strings" @@ -10,7 +11,6 @@ import ( containertypes "github.com/docker/docker/api/types/container" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type updateOptions struct { diff --git a/cli/command/container/utils.go b/cli/command/container/utils.go index dbd85c0a40..f329261417 100644 --- a/cli/command/container/utils.go +++ b/cli/command/container/utils.go @@ -1,6 +1,7 @@ package container import ( + "context" "strconv" "github.com/docker/cli/cli/command" @@ -10,7 +11,6 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/versions" "github.com/sirupsen/logrus" - "golang.org/x/net/context" ) func waitExitOrRemoved(ctx context.Context, dockerCli command.Cli, containerID string, waitRemove bool) <-chan int { diff --git a/cli/command/container/utils_test.go b/cli/command/container/utils_test.go index c4aa3eddc7..de9d33a734 100644 --- a/cli/command/container/utils_test.go +++ b/cli/command/container/utils_test.go @@ -1,6 +1,7 @@ package container import ( + "context" "strings" "testing" @@ -10,7 +11,6 @@ import ( "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/pkg/errors" - "golang.org/x/net/context" ) func waitFn(cid string) (<-chan container.ContainerWaitOKBody, <-chan error) { diff --git a/cli/command/container/wait.go b/cli/command/container/wait.go index 18c7a2523c..8602e25398 100644 --- a/cli/command/container/wait.go +++ b/cli/command/container/wait.go @@ -1,6 +1,7 @@ package container import ( + "context" "fmt" "strings" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/cli/command" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type waitOptions struct { diff --git a/cli/command/idresolver/client_test.go b/cli/command/idresolver/client_test.go index f84683b907..c53cfc6a8b 100644 --- a/cli/command/idresolver/client_test.go +++ b/cli/command/idresolver/client_test.go @@ -1,10 +1,11 @@ package idresolver import ( + "context" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" - "golang.org/x/net/context" ) type fakeClient struct { diff --git a/cli/command/idresolver/idresolver.go b/cli/command/idresolver/idresolver.go index 6088b64b59..3d1f71a099 100644 --- a/cli/command/idresolver/idresolver.go +++ b/cli/command/idresolver/idresolver.go @@ -1,7 +1,7 @@ package idresolver import ( - "golang.org/x/net/context" + "context" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" diff --git a/cli/command/idresolver/idresolver_test.go b/cli/command/idresolver/idresolver_test.go index 0ef720a95c..c4ab3fecd4 100644 --- a/cli/command/idresolver/idresolver_test.go +++ b/cli/command/idresolver/idresolver_test.go @@ -7,9 +7,10 @@ import ( "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" // Import builders to get the builder function as package function + "context" + . "github.com/docker/cli/internal/test/builders" "github.com/pkg/errors" - "golang.org/x/net/context" ) func TestResolveError(t *testing.T) { diff --git a/cli/command/image/build.go b/cli/command/image/build.go index 1e87f1ee6a..8265145fa5 100644 --- a/cli/command/image/build.go +++ b/cli/command/image/build.go @@ -4,6 +4,7 @@ import ( "archive/tar" "bufio" "bytes" + "context" "encoding/json" "fmt" "io" @@ -32,7 +33,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type buildOptions struct { diff --git a/cli/command/image/build_test.go b/cli/command/image/build_test.go index 866e290e69..fb8764c64d 100644 --- a/cli/command/image/build_test.go +++ b/cli/command/image/build_test.go @@ -4,6 +4,7 @@ import ( "archive/tar" "bytes" "compress/gzip" + "context" "io" "io/ioutil" "os" @@ -19,7 +20,6 @@ import ( "github.com/gotestyourself/gotestyourself/assert" "github.com/gotestyourself/gotestyourself/fs" "github.com/gotestyourself/gotestyourself/skip" - "golang.org/x/net/context" ) func TestRunBuildDockerfileFromStdinWithCompress(t *testing.T) { diff --git a/cli/command/image/client_test.go b/cli/command/image/client_test.go index b91eb7bd84..50e46f4ec1 100644 --- a/cli/command/image/client_test.go +++ b/cli/command/image/client_test.go @@ -1,6 +1,7 @@ package image import ( + "context" "io" "io/ioutil" "strings" @@ -10,7 +11,6 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/image" "github.com/docker/docker/client" - "golang.org/x/net/context" ) type fakeClient struct { diff --git a/cli/command/image/history.go b/cli/command/image/history.go index 27782d107a..11acc93d31 100644 --- a/cli/command/image/history.go +++ b/cli/command/image/history.go @@ -1,7 +1,7 @@ package image import ( - "golang.org/x/net/context" + "context" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" diff --git a/cli/command/image/import.go b/cli/command/image/import.go index 1f7189a95b..cfa6a87b2d 100644 --- a/cli/command/image/import.go +++ b/cli/command/image/import.go @@ -1,6 +1,7 @@ package image import ( + "context" "io" "os" @@ -11,7 +12,6 @@ import ( "github.com/docker/docker/pkg/jsonmessage" "github.com/docker/docker/pkg/urlutil" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type importOptions struct { diff --git a/cli/command/image/inspect.go b/cli/command/image/inspect.go index a510e30764..2044fcafdf 100644 --- a/cli/command/image/inspect.go +++ b/cli/command/image/inspect.go @@ -1,7 +1,7 @@ package image import ( - "golang.org/x/net/context" + "context" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" diff --git a/cli/command/image/list.go b/cli/command/image/list.go index 6dada82525..2dd9786e96 100644 --- a/cli/command/image/list.go +++ b/cli/command/image/list.go @@ -1,13 +1,14 @@ package image import ( + "context" + "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/formatter" "github.com/docker/cli/opts" "github.com/docker/docker/api/types" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type imagesOptions struct { diff --git a/cli/command/image/load.go b/cli/command/image/load.go index 6708599fd7..6809c6203a 100644 --- a/cli/command/image/load.go +++ b/cli/command/image/load.go @@ -1,10 +1,9 @@ package image import ( + "context" "io" - "golang.org/x/net/context" - "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/docker/pkg/jsonmessage" diff --git a/cli/command/image/prune.go b/cli/command/image/prune.go index 41590e4ecb..ada47df3bb 100644 --- a/cli/command/image/prune.go +++ b/cli/command/image/prune.go @@ -1,10 +1,9 @@ package image import ( + "context" "fmt" - "golang.org/x/net/context" - "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/cli/opts" diff --git a/cli/command/image/pull.go b/cli/command/image/pull.go index 84bf804165..9ac382c395 100644 --- a/cli/command/image/pull.go +++ b/cli/command/image/pull.go @@ -1,6 +1,7 @@ package image import ( + "context" "fmt" "strings" @@ -10,7 +11,6 @@ import ( "github.com/docker/distribution/reference" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) // PullOptions defines what and how to pull diff --git a/cli/command/image/push.go b/cli/command/image/push.go index 61e1b09d62..f05e813360 100644 --- a/cli/command/image/push.go +++ b/cli/command/image/push.go @@ -1,7 +1,7 @@ package image import ( - "golang.org/x/net/context" + "context" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" diff --git a/cli/command/image/remove.go b/cli/command/image/remove.go index 9266ca020e..a4c72e444f 100644 --- a/cli/command/image/remove.go +++ b/cli/command/image/remove.go @@ -1,11 +1,10 @@ package image import ( + "context" "fmt" "strings" - "golang.org/x/net/context" - "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/docker/api/types" diff --git a/cli/command/image/save.go b/cli/command/image/save.go index 9cae97b370..daa0dd8f72 100644 --- a/cli/command/image/save.go +++ b/cli/command/image/save.go @@ -1,6 +1,7 @@ package image import ( + "context" "io" "os" "path/filepath" @@ -9,7 +10,6 @@ import ( "github.com/docker/cli/cli/command" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type saveOptions struct { diff --git a/cli/command/image/tag.go b/cli/command/image/tag.go index 2a50c127c4..39d4caaf43 100644 --- a/cli/command/image/tag.go +++ b/cli/command/image/tag.go @@ -1,7 +1,7 @@ package image import ( - "golang.org/x/net/context" + "context" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" diff --git a/cli/command/image/trust.go b/cli/command/image/trust.go index 4dffff1289..58adaac31b 100644 --- a/cli/command/image/trust.go +++ b/cli/command/image/trust.go @@ -1,6 +1,7 @@ package image import ( + "context" "encoding/hex" "encoding/json" "fmt" @@ -19,7 +20,6 @@ import ( "github.com/sirupsen/logrus" "github.com/theupdateframework/notary/client" "github.com/theupdateframework/notary/tuf/data" - "golang.org/x/net/context" ) type target struct { diff --git a/cli/command/manifest/client_test.go b/cli/command/manifest/client_test.go index eb1b72324e..07967c29ab 100644 --- a/cli/command/manifest/client_test.go +++ b/cli/command/manifest/client_test.go @@ -1,12 +1,13 @@ package manifest import ( + "context" + manifesttypes "github.com/docker/cli/cli/manifest/types" "github.com/docker/cli/cli/registry/client" "github.com/docker/distribution" "github.com/docker/distribution/reference" "github.com/opencontainers/go-digest" - "golang.org/x/net/context" ) type fakeRegistryClient struct { diff --git a/cli/command/manifest/create_list.go b/cli/command/manifest/create_list.go index fb2e548427..f2e54dcff6 100644 --- a/cli/command/manifest/create_list.go +++ b/cli/command/manifest/create_list.go @@ -1,6 +1,7 @@ package manifest import ( + "context" "fmt" "github.com/docker/cli/cli" @@ -9,7 +10,6 @@ import ( "github.com/docker/docker/registry" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type createOpts struct { diff --git a/cli/command/manifest/create_test.go b/cli/command/manifest/create_test.go index 378aa86041..9082c56ed3 100644 --- a/cli/command/manifest/create_test.go +++ b/cli/command/manifest/create_test.go @@ -1,6 +1,7 @@ package manifest import ( + "context" "io/ioutil" "testing" @@ -11,7 +12,6 @@ import ( is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/gotestyourself/gotestyourself/golden" "github.com/pkg/errors" - "golang.org/x/net/context" ) func TestManifestCreateErrors(t *testing.T) { diff --git a/cli/command/manifest/inspect.go b/cli/command/manifest/inspect.go index c9e67fca49..efb528ecca 100644 --- a/cli/command/manifest/inspect.go +++ b/cli/command/manifest/inspect.go @@ -2,6 +2,7 @@ package manifest import ( "bytes" + "context" "encoding/json" "fmt" @@ -12,7 +13,6 @@ import ( "github.com/docker/distribution/reference" "github.com/docker/docker/registry" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type inspectOptions struct { diff --git a/cli/command/manifest/inspect_test.go b/cli/command/manifest/inspect_test.go index 9ba503a80e..06192fb38d 100644 --- a/cli/command/manifest/inspect_test.go +++ b/cli/command/manifest/inspect_test.go @@ -1,6 +1,7 @@ package manifest import ( + "context" "io/ioutil" "os" "testing" @@ -17,7 +18,6 @@ import ( "github.com/gotestyourself/gotestyourself/golden" digest "github.com/opencontainers/go-digest" "github.com/pkg/errors" - "golang.org/x/net/context" ) func newTempManifestStore(t *testing.T) (store.Store, func()) { diff --git a/cli/command/manifest/push.go b/cli/command/manifest/push.go index a40d62d3dc..0d752371c5 100644 --- a/cli/command/manifest/push.go +++ b/cli/command/manifest/push.go @@ -1,6 +1,7 @@ package manifest import ( + "context" "encoding/json" "fmt" "io" @@ -15,7 +16,6 @@ import ( "github.com/docker/docker/registry" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type pushOpts struct { diff --git a/cli/command/manifest/push_test.go b/cli/command/manifest/push_test.go index e3c074add2..a09069606b 100644 --- a/cli/command/manifest/push_test.go +++ b/cli/command/manifest/push_test.go @@ -1,6 +1,7 @@ package manifest import ( + "context" "io/ioutil" "testing" @@ -9,7 +10,6 @@ import ( "github.com/docker/distribution/reference" "github.com/gotestyourself/gotestyourself/assert" "github.com/pkg/errors" - "golang.org/x/net/context" ) func newFakeRegistryClient() *fakeRegistryClient { diff --git a/cli/command/manifest/util.go b/cli/command/manifest/util.go index b8887c7968..8d4bd30364 100644 --- a/cli/command/manifest/util.go +++ b/cli/command/manifest/util.go @@ -1,11 +1,12 @@ package manifest import ( + "context" + "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/manifest/store" "github.com/docker/cli/cli/manifest/types" "github.com/docker/distribution/reference" - "golang.org/x/net/context" ) type osArch struct { diff --git a/cli/command/network/client_test.go b/cli/command/network/client_test.go index 029499e93d..33cec6e5c5 100644 --- a/cli/command/network/client_test.go +++ b/cli/command/network/client_test.go @@ -1,10 +1,11 @@ package network import ( + "context" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/network" "github.com/docker/docker/client" - "golang.org/x/net/context" ) type fakeClient struct { diff --git a/cli/command/network/connect.go b/cli/command/network/connect.go index 9e925c3444..7ff055aaba 100644 --- a/cli/command/network/connect.go +++ b/cli/command/network/connect.go @@ -1,12 +1,13 @@ package network import ( + "context" + "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/cli/opts" "github.com/docker/docker/api/types/network" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type connectOptions struct { diff --git a/cli/command/network/connect_test.go b/cli/command/network/connect_test.go index e4a96e90a8..59e35ab1ae 100644 --- a/cli/command/network/connect_test.go +++ b/cli/command/network/connect_test.go @@ -1,6 +1,7 @@ package network import ( + "context" "io/ioutil" "testing" @@ -9,7 +10,6 @@ import ( "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/pkg/errors" - "golang.org/x/net/context" ) func TestNetworkConnectErrors(t *testing.T) { diff --git a/cli/command/network/create.go b/cli/command/network/create.go index 33bbdef5be..a8dda0a258 100644 --- a/cli/command/network/create.go +++ b/cli/command/network/create.go @@ -1,6 +1,7 @@ package network import ( + "context" "fmt" "net" "strings" @@ -12,7 +13,6 @@ import ( "github.com/docker/docker/api/types/network" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type createOptions struct { diff --git a/cli/command/network/create_test.go b/cli/command/network/create_test.go index 5d52a3078b..3a0fa0fba9 100644 --- a/cli/command/network/create_test.go +++ b/cli/command/network/create_test.go @@ -1,6 +1,7 @@ package network import ( + "context" "io/ioutil" "strings" "testing" @@ -11,7 +12,6 @@ import ( "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/pkg/errors" - "golang.org/x/net/context" ) func TestNetworkCreateErrors(t *testing.T) { diff --git a/cli/command/network/disconnect.go b/cli/command/network/disconnect.go index ab866cf2c1..18bf4c7ba1 100644 --- a/cli/command/network/disconnect.go +++ b/cli/command/network/disconnect.go @@ -1,7 +1,7 @@ package network import ( - "golang.org/x/net/context" + "context" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" diff --git a/cli/command/network/disconnect_test.go b/cli/command/network/disconnect_test.go index 9c1bc0906f..5f15e61877 100644 --- a/cli/command/network/disconnect_test.go +++ b/cli/command/network/disconnect_test.go @@ -1,13 +1,13 @@ package network import ( + "context" "io/ioutil" "testing" "github.com/docker/cli/internal/test" "github.com/gotestyourself/gotestyourself/assert" "github.com/pkg/errors" - "golang.org/x/net/context" ) func TestNetworkDisconnectErrors(t *testing.T) { diff --git a/cli/command/network/inspect.go b/cli/command/network/inspect.go index e4c2e5fb89..3d7543d9eb 100644 --- a/cli/command/network/inspect.go +++ b/cli/command/network/inspect.go @@ -1,7 +1,7 @@ package network import ( - "golang.org/x/net/context" + "context" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" diff --git a/cli/command/network/list.go b/cli/command/network/list.go index 8a7c1f261d..391919299e 100644 --- a/cli/command/network/list.go +++ b/cli/command/network/list.go @@ -1,6 +1,7 @@ package network import ( + "context" "sort" "github.com/docker/cli/cli" @@ -9,7 +10,6 @@ import ( "github.com/docker/cli/opts" "github.com/docker/docker/api/types" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type byNetworkName []types.NetworkResource diff --git a/cli/command/network/list_test.go b/cli/command/network/list_test.go index 558f6cb2ba..cdffcc6459 100644 --- a/cli/command/network/list_test.go +++ b/cli/command/network/list_test.go @@ -1,6 +1,7 @@ package network import ( + "context" "io/ioutil" "strings" "testing" @@ -14,7 +15,6 @@ import ( is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/gotestyourself/gotestyourself/golden" "github.com/pkg/errors" - "golang.org/x/net/context" ) func TestNetworkListErrors(t *testing.T) { diff --git a/cli/command/network/prune.go b/cli/command/network/prune.go index 879e2bd554..b00e5cd21f 100644 --- a/cli/command/network/prune.go +++ b/cli/command/network/prune.go @@ -1,13 +1,13 @@ package network import ( + "context" "fmt" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/cli/opts" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type pruneOptions struct { diff --git a/cli/command/network/remove.go b/cli/command/network/remove.go index 3de7bdad38..66f48197f2 100644 --- a/cli/command/network/remove.go +++ b/cli/command/network/remove.go @@ -1,10 +1,9 @@ package network import ( + "context" "fmt" - "golang.org/x/net/context" - "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/docker/api/types" diff --git a/cli/command/node/client_test.go b/cli/command/node/client_test.go index 1f5cdc7cee..75a128cd46 100644 --- a/cli/command/node/client_test.go +++ b/cli/command/node/client_test.go @@ -1,10 +1,11 @@ package node import ( + "context" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" - "golang.org/x/net/context" ) type fakeClient struct { diff --git a/cli/command/node/cmd.go b/cli/command/node/cmd.go index f5d194352f..f96c9a6bf3 100644 --- a/cli/command/node/cmd.go +++ b/cli/command/node/cmd.go @@ -1,6 +1,7 @@ package node import ( + "context" "errors" "github.com/docker/cli/cli" @@ -8,7 +9,6 @@ import ( "github.com/docker/docker/api/types" apiclient "github.com/docker/docker/client" "github.com/spf13/cobra" - "golang.org/x/net/context" ) // NewNodeCommand returns a cobra command for `node` subcommands diff --git a/cli/command/node/inspect.go b/cli/command/node/inspect.go index ffb4efe459..0dcb5db9b1 100644 --- a/cli/command/node/inspect.go +++ b/cli/command/node/inspect.go @@ -1,6 +1,7 @@ package node import ( + "context" "fmt" "strings" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/formatter" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type inspectOptions struct { diff --git a/cli/command/node/list.go b/cli/command/node/list.go index 7dac795663..d35ed0ea8f 100644 --- a/cli/command/node/list.go +++ b/cli/command/node/list.go @@ -1,6 +1,7 @@ package node import ( + "context" "sort" "github.com/docker/cli/cli" @@ -10,7 +11,6 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/spf13/cobra" - "golang.org/x/net/context" "vbom.ml/util/sortorder" ) diff --git a/cli/command/node/ps.go b/cli/command/node/ps.go index 5212e596f3..2450e6af39 100644 --- a/cli/command/node/ps.go +++ b/cli/command/node/ps.go @@ -1,6 +1,7 @@ package node import ( + "context" "strings" "github.com/docker/cli/cli" @@ -12,7 +13,6 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type psOptions struct { diff --git a/cli/command/node/remove.go b/cli/command/node/remove.go index d23ec2fb5c..65e3cdc30a 100644 --- a/cli/command/node/remove.go +++ b/cli/command/node/remove.go @@ -1,11 +1,10 @@ package node import ( + "context" "fmt" "strings" - "golang.org/x/net/context" - "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/docker/api/types" diff --git a/cli/command/node/update.go b/cli/command/node/update.go index 017cf7dcb5..dbae49c6f0 100644 --- a/cli/command/node/update.go +++ b/cli/command/node/update.go @@ -1,6 +1,7 @@ package node import ( + "context" "fmt" "github.com/docker/cli/cli" @@ -10,7 +11,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" - "golang.org/x/net/context" ) var ( diff --git a/cli/command/plugin/client_test.go b/cli/command/plugin/client_test.go index b543542764..07b4a06e28 100644 --- a/cli/command/plugin/client_test.go +++ b/cli/command/plugin/client_test.go @@ -1,11 +1,11 @@ package plugin import ( + "context" "io" "github.com/docker/docker/api/types" "github.com/docker/docker/client" - "golang.org/x/net/context" ) type fakeClient struct { diff --git a/cli/command/plugin/create.go b/cli/command/plugin/create.go index fd22feef20..d6550edaaa 100644 --- a/cli/command/plugin/create.go +++ b/cli/command/plugin/create.go @@ -1,6 +1,7 @@ package plugin import ( + "context" "encoding/json" "fmt" "io" @@ -15,7 +16,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "golang.org/x/net/context" ) // validateTag checks if the given repoName can be resolved. diff --git a/cli/command/plugin/disable.go b/cli/command/plugin/disable.go index b3f255e787..014d86b2b8 100644 --- a/cli/command/plugin/disable.go +++ b/cli/command/plugin/disable.go @@ -1,13 +1,13 @@ package plugin import ( + "context" "fmt" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/docker/api/types" "github.com/spf13/cobra" - "golang.org/x/net/context" ) func newDisableCommand(dockerCli command.Cli) *cobra.Command { diff --git a/cli/command/plugin/enable.go b/cli/command/plugin/enable.go index ec051622cd..19df1e7bd2 100644 --- a/cli/command/plugin/enable.go +++ b/cli/command/plugin/enable.go @@ -1,6 +1,7 @@ package plugin import ( + "context" "fmt" "github.com/docker/cli/cli" @@ -8,7 +9,6 @@ import ( "github.com/docker/docker/api/types" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type enableOpts struct { diff --git a/cli/command/plugin/inspect.go b/cli/command/plugin/inspect.go index 66736ea873..9ce49eb908 100644 --- a/cli/command/plugin/inspect.go +++ b/cli/command/plugin/inspect.go @@ -1,11 +1,12 @@ package plugin import ( + "context" + "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/inspect" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type inspectOptions struct { diff --git a/cli/command/plugin/install.go b/cli/command/plugin/install.go index 88fecbfda0..44e007f66d 100644 --- a/cli/command/plugin/install.go +++ b/cli/command/plugin/install.go @@ -1,6 +1,7 @@ package plugin import ( + "context" "fmt" "strings" @@ -14,7 +15,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" - "golang.org/x/net/context" ) type pluginOptions struct { diff --git a/cli/command/plugin/list.go b/cli/command/plugin/list.go index 3ec6acf272..efbb0ffef4 100644 --- a/cli/command/plugin/list.go +++ b/cli/command/plugin/list.go @@ -1,12 +1,13 @@ package plugin import ( + "context" + "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/formatter" "github.com/docker/cli/opts" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type listOptions struct { diff --git a/cli/command/plugin/push.go b/cli/command/plugin/push.go index 5dd039f8bf..7df5a89de6 100644 --- a/cli/command/plugin/push.go +++ b/cli/command/plugin/push.go @@ -1,7 +1,7 @@ package plugin import ( - "golang.org/x/net/context" + "context" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" diff --git a/cli/command/plugin/remove.go b/cli/command/plugin/remove.go index e701baa850..a2092bd76b 100644 --- a/cli/command/plugin/remove.go +++ b/cli/command/plugin/remove.go @@ -1,13 +1,13 @@ package plugin import ( + "context" "fmt" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/docker/api/types" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type rmOptions struct { diff --git a/cli/command/plugin/set.go b/cli/command/plugin/set.go index 79c5feb66f..724fdebfd5 100644 --- a/cli/command/plugin/set.go +++ b/cli/command/plugin/set.go @@ -1,7 +1,7 @@ package plugin import ( - "golang.org/x/net/context" + "context" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" diff --git a/cli/command/registry.go b/cli/command/registry.go index cb9a3947da..084d2b6055 100644 --- a/cli/command/registry.go +++ b/cli/command/registry.go @@ -2,6 +2,7 @@ package command import ( "bufio" + "context" "encoding/base64" "encoding/json" "fmt" @@ -16,7 +17,6 @@ import ( "github.com/docker/docker/pkg/term" "github.com/docker/docker/registry" "github.com/pkg/errors" - "golang.org/x/net/context" ) // ElectAuthServer returns the default registry to use (by asking the daemon) diff --git a/cli/command/registry/login.go b/cli/command/registry/login.go index 4cd57b0c33..7d5328d199 100644 --- a/cli/command/registry/login.go +++ b/cli/command/registry/login.go @@ -1,12 +1,11 @@ package registry import ( + "context" "fmt" "io/ioutil" "strings" - "golang.org/x/net/context" - "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/docker/api/types" diff --git a/cli/command/registry/login_test.go b/cli/command/registry/login_test.go index afb929e2c8..9eb3f682c1 100644 --- a/cli/command/registry/login_test.go +++ b/cli/command/registry/login_test.go @@ -2,6 +2,7 @@ package registry import ( "bytes" + "context" "fmt" "testing" @@ -12,7 +13,6 @@ import ( "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/gotestyourself/gotestyourself/fs" - "golang.org/x/net/context" ) const userErr = "userunknownError" diff --git a/cli/command/registry/logout.go b/cli/command/registry/logout.go index cce626e58a..ac84139f7e 100644 --- a/cli/command/registry/logout.go +++ b/cli/command/registry/logout.go @@ -1,10 +1,9 @@ package registry import ( + "context" "fmt" - "golang.org/x/net/context" - "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/docker/registry" diff --git a/cli/command/registry/search.go b/cli/command/registry/search.go index 49ac0f43cf..1af6fcd5ce 100644 --- a/cli/command/registry/search.go +++ b/cli/command/registry/search.go @@ -1,6 +1,7 @@ package registry import ( + "context" "sort" "github.com/docker/cli/cli" @@ -11,7 +12,6 @@ import ( registrytypes "github.com/docker/docker/api/types/registry" "github.com/docker/docker/registry" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type searchOptions struct { diff --git a/cli/command/registry_test.go b/cli/command/registry_test.go index 33407b9f44..f6be9b316b 100644 --- a/cli/command/registry_test.go +++ b/cli/command/registry_test.go @@ -2,13 +2,13 @@ package command_test import ( "bytes" + "context" "fmt" "testing" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/pkg/errors" - "golang.org/x/net/context" // Prevents a circular import with "github.com/docker/cli/internal/test" diff --git a/cli/command/secret/client_test.go b/cli/command/secret/client_test.go index bb4b412fc2..ea672fa473 100644 --- a/cli/command/secret/client_test.go +++ b/cli/command/secret/client_test.go @@ -1,10 +1,11 @@ package secret import ( + "context" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" - "golang.org/x/net/context" ) type fakeClient struct { diff --git a/cli/command/secret/create.go b/cli/command/secret/create.go index e4164cb0d2..1739fefa9c 100644 --- a/cli/command/secret/create.go +++ b/cli/command/secret/create.go @@ -1,6 +1,7 @@ package secret import ( + "context" "fmt" "io" "io/ioutil" @@ -12,7 +13,6 @@ import ( "github.com/docker/docker/pkg/system" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type createOptions struct { diff --git a/cli/command/secret/inspect.go b/cli/command/secret/inspect.go index 51410487a5..1afcb5211f 100644 --- a/cli/command/secret/inspect.go +++ b/cli/command/secret/inspect.go @@ -1,6 +1,7 @@ package secret import ( + "context" "fmt" "strings" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/formatter" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type inspectOptions struct { diff --git a/cli/command/secret/ls.go b/cli/command/secret/ls.go index 7dc9a35f5f..a778137e48 100644 --- a/cli/command/secret/ls.go +++ b/cli/command/secret/ls.go @@ -1,6 +1,7 @@ package secret import ( + "context" "sort" "github.com/docker/cli/cli" @@ -10,7 +11,6 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/spf13/cobra" - "golang.org/x/net/context" "vbom.ml/util/sortorder" ) diff --git a/cli/command/secret/remove.go b/cli/command/secret/remove.go index 969b9ceb75..bdf47b77fa 100644 --- a/cli/command/secret/remove.go +++ b/cli/command/secret/remove.go @@ -1,6 +1,7 @@ package secret import ( + "context" "fmt" "strings" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/cli/command" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type removeOptions struct { diff --git a/cli/command/service/client_test.go b/cli/command/service/client_test.go index b1349844c9..8d0d592cec 100644 --- a/cli/command/service/client_test.go +++ b/cli/command/service/client_test.go @@ -1,10 +1,11 @@ package service import ( + "context" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" - "golang.org/x/net/context" // Import builders to get the builder function as package function . "github.com/docker/cli/internal/test/builders" ) diff --git a/cli/command/service/create.go b/cli/command/service/create.go index 299cdc383f..ca7aaba376 100644 --- a/cli/command/service/create.go +++ b/cli/command/service/create.go @@ -1,6 +1,7 @@ package service import ( + "context" "fmt" "github.com/docker/cli/cli" @@ -10,7 +11,6 @@ import ( "github.com/docker/docker/api/types/versions" "github.com/spf13/cobra" "github.com/spf13/pflag" - "golang.org/x/net/context" ) func newCreateCommand(dockerCli command.Cli) *cobra.Command { diff --git a/cli/command/service/helpers.go b/cli/command/service/helpers.go index f328c7059a..eb508e85fb 100644 --- a/cli/command/service/helpers.go +++ b/cli/command/service/helpers.go @@ -1,13 +1,13 @@ package service import ( + "context" "io" "io/ioutil" "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/service/progress" "github.com/docker/docker/pkg/jsonmessage" - "golang.org/x/net/context" ) // waitOnService waits for the service to converge. It outputs a progress bar, diff --git a/cli/command/service/inspect.go b/cli/command/service/inspect.go index 8a9ddefe07..7f988fae56 100644 --- a/cli/command/service/inspect.go +++ b/cli/command/service/inspect.go @@ -1,10 +1,9 @@ package service import ( + "context" "strings" - "golang.org/x/net/context" - "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/formatter" diff --git a/cli/command/service/list.go b/cli/command/service/list.go index 63adce1ec1..db4b037694 100644 --- a/cli/command/service/list.go +++ b/cli/command/service/list.go @@ -1,6 +1,7 @@ package service import ( + "context" "fmt" "sort" @@ -14,7 +15,6 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type listOptions struct { diff --git a/cli/command/service/list_test.go b/cli/command/service/list_test.go index 6286906f32..c84dd587fd 100644 --- a/cli/command/service/list_test.go +++ b/cli/command/service/list_test.go @@ -1,6 +1,7 @@ package service import ( + "context" "testing" "github.com/docker/cli/internal/test" @@ -8,7 +9,6 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/gotestyourself/gotestyourself/assert" "github.com/gotestyourself/gotestyourself/golden" - "golang.org/x/net/context" ) func TestServiceListOrder(t *testing.T) { diff --git a/cli/command/service/logs.go b/cli/command/service/logs.go index 13f150b750..107c9d2153 100644 --- a/cli/command/service/logs.go +++ b/cli/command/service/logs.go @@ -2,14 +2,13 @@ package service import ( "bytes" + "context" "fmt" "io" "sort" "strconv" "strings" - "golang.org/x/net/context" - "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/idresolver" diff --git a/cli/command/service/opts.go b/cli/command/service/opts.go index e8f9718c7c..69cecbbf02 100644 --- a/cli/command/service/opts.go +++ b/cli/command/service/opts.go @@ -1,6 +1,7 @@ package service import ( + "context" "fmt" "sort" "strconv" @@ -18,7 +19,6 @@ import ( gogotypes "github.com/gogo/protobuf/types" "github.com/pkg/errors" "github.com/spf13/pflag" - "golang.org/x/net/context" ) type int64Value interface { diff --git a/cli/command/service/parse.go b/cli/command/service/parse.go index 6f69cbb47f..254107071f 100644 --- a/cli/command/service/parse.go +++ b/cli/command/service/parse.go @@ -1,12 +1,13 @@ package service import ( + "context" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" swarmtypes "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" "github.com/pkg/errors" - "golang.org/x/net/context" ) // ParseSecrets retrieves the secrets with the requested names and fills diff --git a/cli/command/service/progress/progress.go b/cli/command/service/progress/progress.go index adff486848..4b9cdd7337 100644 --- a/cli/command/service/progress/progress.go +++ b/cli/command/service/progress/progress.go @@ -1,6 +1,7 @@ package progress import ( + "context" "errors" "fmt" "io" @@ -16,7 +17,6 @@ import ( "github.com/docker/docker/pkg/progress" "github.com/docker/docker/pkg/streamformatter" "github.com/docker/docker/pkg/stringid" - "golang.org/x/net/context" ) var ( diff --git a/cli/command/service/ps.go b/cli/command/service/ps.go index a1da43e973..0220f7e041 100644 --- a/cli/command/service/ps.go +++ b/cli/command/service/ps.go @@ -1,6 +1,7 @@ package service import ( + "context" "strings" "github.com/docker/cli/cli" @@ -14,7 +15,6 @@ import ( "github.com/docker/docker/client" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type psOptions struct { diff --git a/cli/command/service/ps_test.go b/cli/command/service/ps_test.go index bb66849f55..80ee61e9f7 100644 --- a/cli/command/service/ps_test.go +++ b/cli/command/service/ps_test.go @@ -1,6 +1,7 @@ package service import ( + "context" "testing" "github.com/docker/cli/internal/test" @@ -11,7 +12,6 @@ import ( "github.com/google/go-cmp/cmp" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" - "golang.org/x/net/context" ) func TestCreateFilter(t *testing.T) { diff --git a/cli/command/service/remove.go b/cli/command/service/remove.go index 38833b2e7e..ee810b0388 100644 --- a/cli/command/service/remove.go +++ b/cli/command/service/remove.go @@ -1,6 +1,7 @@ package service import ( + "context" "fmt" "strings" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/cli/command" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) func newRemoveCommand(dockerCli command.Cli) *cobra.Command { diff --git a/cli/command/service/rollback_test.go b/cli/command/service/rollback_test.go index 6e5620cbe7..70795af945 100644 --- a/cli/command/service/rollback_test.go +++ b/cli/command/service/rollback_test.go @@ -1,6 +1,7 @@ package service import ( + "context" "fmt" "io/ioutil" "strings" @@ -11,7 +12,6 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" - "golang.org/x/net/context" ) func TestRollback(t *testing.T) { diff --git a/cli/command/service/scale.go b/cli/command/service/scale.go index d38b01b4b5..5b656a7f33 100644 --- a/cli/command/service/scale.go +++ b/cli/command/service/scale.go @@ -1,12 +1,11 @@ package service import ( + "context" "fmt" "strconv" "strings" - "golang.org/x/net/context" - "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/docker/api/types" diff --git a/cli/command/service/trust.go b/cli/command/service/trust.go index c304a99124..b7453ccbb9 100644 --- a/cli/command/service/trust.go +++ b/cli/command/service/trust.go @@ -1,6 +1,7 @@ package service import ( + "context" "encoding/hex" "github.com/docker/cli/cli/command" @@ -12,7 +13,6 @@ import ( "github.com/pkg/errors" "github.com/sirupsen/logrus" "github.com/theupdateframework/notary/tuf/data" - "golang.org/x/net/context" ) func resolveServiceImageDigestContentTrust(dockerCli command.Cli, service *swarm.ServiceSpec) error { diff --git a/cli/command/service/update.go b/cli/command/service/update.go index ca9752a656..5fc8b729a7 100644 --- a/cli/command/service/update.go +++ b/cli/command/service/update.go @@ -1,6 +1,7 @@ package service import ( + "context" "fmt" "sort" "strings" @@ -19,7 +20,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" - "golang.org/x/net/context" ) func newUpdateCommand(dockerCli command.Cli) *cobra.Command { diff --git a/cli/command/service/update_test.go b/cli/command/service/update_test.go index d647093254..ff746a0420 100644 --- a/cli/command/service/update_test.go +++ b/cli/command/service/update_test.go @@ -1,6 +1,7 @@ package service import ( + "context" "fmt" "reflect" "sort" @@ -13,7 +14,6 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" - "golang.org/x/net/context" ) func TestUpdateServiceArgs(t *testing.T) { diff --git a/cli/command/stack/client_test.go b/cli/command/stack/client_test.go index bcb92db6c9..c028d668cf 100644 --- a/cli/command/stack/client_test.go +++ b/cli/command/stack/client_test.go @@ -1,6 +1,7 @@ package stack import ( + "context" "strings" "github.com/docker/cli/cli/compose/convert" @@ -9,7 +10,6 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" - "golang.org/x/net/context" ) type fakeClient struct { diff --git a/cli/command/stack/swarm/client_test.go b/cli/command/stack/swarm/client_test.go index 105116fe57..7f9375e99f 100644 --- a/cli/command/stack/swarm/client_test.go +++ b/cli/command/stack/swarm/client_test.go @@ -1,6 +1,7 @@ package swarm import ( + "context" "strings" "github.com/docker/cli/cli/compose/convert" @@ -9,7 +10,6 @@ import ( "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" - "golang.org/x/net/context" ) type fakeClient struct { diff --git a/cli/command/stack/swarm/common.go b/cli/command/stack/swarm/common.go index f599b7096b..b90ca9acfa 100644 --- a/cli/command/stack/swarm/common.go +++ b/cli/command/stack/swarm/common.go @@ -1,13 +1,14 @@ package swarm import ( + "context" + "github.com/docker/cli/cli/compose/convert" "github.com/docker/cli/opts" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" - "golang.org/x/net/context" ) func getStackFilter(namespace string) filters.Args { diff --git a/cli/command/stack/swarm/deploy.go b/cli/command/stack/swarm/deploy.go index ee6a61784f..e7d0cf482d 100644 --- a/cli/command/stack/swarm/deploy.go +++ b/cli/command/stack/swarm/deploy.go @@ -1,6 +1,7 @@ package swarm import ( + "context" "fmt" "github.com/docker/cli/cli/command" @@ -9,7 +10,6 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/versions" "github.com/pkg/errors" - "golang.org/x/net/context" ) // Resolve image constants diff --git a/cli/command/stack/swarm/deploy_bundlefile.go b/cli/command/stack/swarm/deploy_bundlefile.go index c730f3a231..96d8c1ef5c 100644 --- a/cli/command/stack/swarm/deploy_bundlefile.go +++ b/cli/command/stack/swarm/deploy_bundlefile.go @@ -1,12 +1,11 @@ package swarm import ( + "context" "fmt" "io" "os" - "golang.org/x/net/context" - "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/bundlefile" "github.com/docker/cli/cli/command/stack/options" diff --git a/cli/command/stack/swarm/deploy_composefile.go b/cli/command/stack/swarm/deploy_composefile.go index 08ea1ef6aa..477a4427aa 100644 --- a/cli/command/stack/swarm/deploy_composefile.go +++ b/cli/command/stack/swarm/deploy_composefile.go @@ -1,6 +1,7 @@ package swarm import ( + "context" "fmt" "github.com/docker/cli/cli/command" @@ -14,7 +15,6 @@ import ( apiclient "github.com/docker/docker/client" dockerclient "github.com/docker/docker/client" "github.com/pkg/errors" - "golang.org/x/net/context" ) func deployCompose(ctx context.Context, dockerCli command.Cli, opts options.Deploy) error { diff --git a/cli/command/stack/swarm/deploy_composefile_test.go b/cli/command/stack/swarm/deploy_composefile_test.go index 2903fd3c42..a3278b8479 100644 --- a/cli/command/stack/swarm/deploy_composefile_test.go +++ b/cli/command/stack/swarm/deploy_composefile_test.go @@ -1,13 +1,13 @@ package swarm import ( + "context" "testing" "github.com/docker/cli/internal/test/network" "github.com/docker/docker/api/types" "github.com/gotestyourself/gotestyourself/assert" "github.com/pkg/errors" - "golang.org/x/net/context" ) type notFound struct { diff --git a/cli/command/stack/swarm/deploy_test.go b/cli/command/stack/swarm/deploy_test.go index 99800b4ae2..6a108e5f16 100644 --- a/cli/command/stack/swarm/deploy_test.go +++ b/cli/command/stack/swarm/deploy_test.go @@ -1,6 +1,7 @@ package swarm import ( + "context" "testing" "github.com/docker/cli/cli/compose/convert" @@ -9,7 +10,6 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" - "golang.org/x/net/context" ) func TestPruneServices(t *testing.T) { diff --git a/cli/command/stack/swarm/list.go b/cli/command/stack/swarm/list.go index c9fcc8ffc5..fdc77afcae 100644 --- a/cli/command/stack/swarm/list.go +++ b/cli/command/stack/swarm/list.go @@ -1,6 +1,7 @@ package swarm import ( + "context" "sort" "github.com/docker/cli/cli/command" @@ -10,7 +11,6 @@ import ( "github.com/docker/docker/api/types" "github.com/docker/docker/client" "github.com/pkg/errors" - "golang.org/x/net/context" "vbom.ml/util/sortorder" ) diff --git a/cli/command/stack/swarm/ps.go b/cli/command/stack/swarm/ps.go index 721f85d9c3..ce90856fbe 100644 --- a/cli/command/stack/swarm/ps.go +++ b/cli/command/stack/swarm/ps.go @@ -1,6 +1,7 @@ package swarm import ( + "context" "fmt" "github.com/docker/cli/cli/command" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/cli/command/stack/options" "github.com/docker/cli/cli/command/task" "github.com/docker/docker/api/types" - "golang.org/x/net/context" ) // RunPS is the swarm implementation of docker stack ps diff --git a/cli/command/stack/swarm/remove.go b/cli/command/stack/swarm/remove.go index 4b5941c252..5ae9afa229 100644 --- a/cli/command/stack/swarm/remove.go +++ b/cli/command/stack/swarm/remove.go @@ -1,6 +1,7 @@ package swarm import ( + "context" "fmt" "sort" "strings" @@ -11,7 +12,6 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/api/types/versions" "github.com/pkg/errors" - "golang.org/x/net/context" ) // RunRemove is the swarm implementation of docker stack remove diff --git a/cli/command/stack/swarm/services.go b/cli/command/stack/swarm/services.go index aceb82dff2..07b990adc8 100644 --- a/cli/command/stack/swarm/services.go +++ b/cli/command/stack/swarm/services.go @@ -1,6 +1,7 @@ package swarm import ( + "context" "fmt" "github.com/docker/cli/cli/command" @@ -9,7 +10,6 @@ import ( "github.com/docker/cli/cli/command/stack/options" "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" - "golang.org/x/net/context" ) // RunServices is the swarm implementation of docker stack services diff --git a/cli/command/swarm/ca.go b/cli/command/swarm/ca.go index 5535172e59..1aa619ecf3 100644 --- a/cli/command/swarm/ca.go +++ b/cli/command/swarm/ca.go @@ -1,6 +1,7 @@ package swarm import ( + "context" "fmt" "io" "io/ioutil" @@ -14,7 +15,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "github.com/spf13/pflag" - "golang.org/x/net/context" ) type caOptions struct { diff --git a/cli/command/swarm/client_test.go b/cli/command/swarm/client_test.go index 1d42b9499c..8695c89518 100644 --- a/cli/command/swarm/client_test.go +++ b/cli/command/swarm/client_test.go @@ -1,10 +1,11 @@ package swarm import ( + "context" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" - "golang.org/x/net/context" ) type fakeClient struct { diff --git a/cli/command/swarm/init.go b/cli/command/swarm/init.go index 91b827eb97..d9dadd61af 100644 --- a/cli/command/swarm/init.go +++ b/cli/command/swarm/init.go @@ -1,11 +1,10 @@ package swarm import ( + "context" "fmt" "strings" - "golang.org/x/net/context" - "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/docker/api/types/swarm" diff --git a/cli/command/swarm/join.go b/cli/command/swarm/join.go index 0f09527d07..d794000d95 100644 --- a/cli/command/swarm/join.go +++ b/cli/command/swarm/join.go @@ -1,11 +1,10 @@ package swarm import ( + "context" "fmt" "strings" - "golang.org/x/net/context" - "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/docker/api/types/swarm" diff --git a/cli/command/swarm/join_token.go b/cli/command/swarm/join_token.go index b35efad8a9..f8ed93cf00 100644 --- a/cli/command/swarm/join_token.go +++ b/cli/command/swarm/join_token.go @@ -1,6 +1,7 @@ package swarm import ( + "context" "fmt" "github.com/docker/cli/cli" @@ -8,7 +9,6 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type joinTokenOptions struct { diff --git a/cli/command/swarm/leave.go b/cli/command/swarm/leave.go index c9b33fd0de..af6e0753b5 100644 --- a/cli/command/swarm/leave.go +++ b/cli/command/swarm/leave.go @@ -1,10 +1,9 @@ package swarm import ( + "context" "fmt" - "golang.org/x/net/context" - "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/spf13/cobra" diff --git a/cli/command/swarm/progress/root_rotation.go b/cli/command/swarm/progress/root_rotation.go index 0b84d239e3..e72de1d2d7 100644 --- a/cli/command/swarm/progress/root_rotation.go +++ b/cli/command/swarm/progress/root_rotation.go @@ -2,13 +2,12 @@ package progress import ( "bytes" + "context" "io" "os" "os/signal" "time" - "golang.org/x/net/context" - "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" diff --git a/cli/command/swarm/unlock.go b/cli/command/swarm/unlock.go index 700a8ed533..7d0dce68ae 100644 --- a/cli/command/swarm/unlock.go +++ b/cli/command/swarm/unlock.go @@ -2,6 +2,7 @@ package swarm import ( "bufio" + "context" "fmt" "io" "strings" @@ -12,7 +13,6 @@ import ( "github.com/pkg/errors" "github.com/spf13/cobra" "golang.org/x/crypto/ssh/terminal" - "golang.org/x/net/context" ) func newUnlockCommand(dockerCli command.Cli) *cobra.Command { diff --git a/cli/command/swarm/unlock_key.go b/cli/command/swarm/unlock_key.go index 4618de7dea..be5d9ea284 100644 --- a/cli/command/swarm/unlock_key.go +++ b/cli/command/swarm/unlock_key.go @@ -1,6 +1,7 @@ package swarm import ( + "context" "fmt" "io" @@ -9,7 +10,6 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type unlockKeyOptions struct { diff --git a/cli/command/swarm/update.go b/cli/command/swarm/update.go index 4d751bbd4e..52dc335fdc 100644 --- a/cli/command/swarm/update.go +++ b/cli/command/swarm/update.go @@ -1,10 +1,9 @@ package swarm import ( + "context" "fmt" - "golang.org/x/net/context" - "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/docker/api/types/swarm" diff --git a/cli/command/system/client_test.go b/cli/command/system/client_test.go index 2500ddfeac..20d8dc38cc 100644 --- a/cli/command/system/client_test.go +++ b/cli/command/system/client_test.go @@ -1,9 +1,10 @@ package system import ( + "context" + "github.com/docker/docker/api/types" "github.com/docker/docker/client" - "golang.org/x/net/context" ) type fakeClient struct { diff --git a/cli/command/system/df.go b/cli/command/system/df.go index 5dde8e4c12..def5223feb 100644 --- a/cli/command/system/df.go +++ b/cli/command/system/df.go @@ -1,13 +1,13 @@ package system import ( + "context" "errors" "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/formatter" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type diskUsageOptions struct { diff --git a/cli/command/system/events.go b/cli/command/system/events.go index 8977e56372..37de9722ea 100644 --- a/cli/command/system/events.go +++ b/cli/command/system/events.go @@ -1,6 +1,7 @@ package system import ( + "context" "fmt" "io" "io/ioutil" @@ -16,7 +17,6 @@ import ( "github.com/docker/docker/api/types" eventtypes "github.com/docker/docker/api/types/events" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type eventsOptions struct { diff --git a/cli/command/system/info.go b/cli/command/system/info.go index 5e6171db7d..73aeda632f 100644 --- a/cli/command/system/info.go +++ b/cli/command/system/info.go @@ -1,6 +1,7 @@ package system import ( + "context" "fmt" "io" "sort" @@ -14,7 +15,6 @@ import ( "github.com/docker/docker/api/types/swarm" "github.com/docker/go-units" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type infoOptions struct { diff --git a/cli/command/system/inspect.go b/cli/command/system/inspect.go index 6d079cd69e..ef06f09974 100644 --- a/cli/command/system/inspect.go +++ b/cli/command/system/inspect.go @@ -1,6 +1,7 @@ package system import ( + "context" "fmt" "strings" @@ -11,7 +12,6 @@ import ( apiclient "github.com/docker/docker/client" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type inspectOptions struct { diff --git a/cli/command/system/prune.go b/cli/command/system/prune.go index e777501d89..7ad24e005e 100644 --- a/cli/command/system/prune.go +++ b/cli/command/system/prune.go @@ -2,6 +2,7 @@ package system import ( "bytes" + "context" "fmt" "text/template" @@ -15,7 +16,6 @@ import ( "github.com/docker/docker/api/types/versions" units "github.com/docker/go-units" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type pruneOptions struct { diff --git a/cli/command/system/version.go b/cli/command/system/version.go index c8e3654cbd..ef2ed263a5 100644 --- a/cli/command/system/version.go +++ b/cli/command/system/version.go @@ -1,6 +1,7 @@ package system import ( + "context" "fmt" "runtime" "sort" @@ -15,7 +16,6 @@ import ( "github.com/docker/docker/api/types" "github.com/sirupsen/logrus" "github.com/spf13/cobra" - "golang.org/x/net/context" kubernetesClient "k8s.io/client-go/kubernetes" ) diff --git a/cli/command/system/version_test.go b/cli/command/system/version_test.go index c704ce2051..ea2182563f 100644 --- a/cli/command/system/version_test.go +++ b/cli/command/system/version_test.go @@ -1,6 +1,7 @@ package system import ( + "context" "fmt" "strings" "testing" @@ -12,7 +13,6 @@ import ( "github.com/docker/cli/internal/test" "github.com/docker/docker/api" "github.com/docker/docker/api/types" - "golang.org/x/net/context" ) func TestVersionWithoutServer(t *testing.T) { diff --git a/cli/command/task/client_test.go b/cli/command/task/client_test.go index d04405c236..9aa849779a 100644 --- a/cli/command/task/client_test.go +++ b/cli/command/task/client_test.go @@ -1,10 +1,11 @@ package task import ( + "context" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/swarm" "github.com/docker/docker/client" - "golang.org/x/net/context" ) type fakeClient struct { diff --git a/cli/command/task/print.go b/cli/command/task/print.go index 6526c28beb..0f430e509e 100644 --- a/cli/command/task/print.go +++ b/cli/command/task/print.go @@ -1,6 +1,7 @@ package task import ( + "context" "fmt" "sort" @@ -9,7 +10,6 @@ import ( "github.com/docker/cli/cli/command/idresolver" "github.com/docker/cli/cli/config/configfile" "github.com/docker/docker/api/types/swarm" - "golang.org/x/net/context" ) type tasksBySlot []swarm.Task diff --git a/cli/command/task/print_test.go b/cli/command/task/print_test.go index 731d2de16f..aa1cfed370 100644 --- a/cli/command/task/print_test.go +++ b/cli/command/task/print_test.go @@ -1,13 +1,13 @@ package task import ( + "context" "testing" "time" "github.com/docker/cli/cli/command/formatter" "github.com/docker/cli/cli/command/idresolver" "github.com/docker/cli/internal/test" - "golang.org/x/net/context" // Import builders to get the builder function as package function . "github.com/docker/cli/internal/test/builders" "github.com/docker/docker/api/types" diff --git a/cli/command/volume/client_test.go b/cli/command/volume/client_test.go index c29655cdb0..833745d6d2 100644 --- a/cli/command/volume/client_test.go +++ b/cli/command/volume/client_test.go @@ -1,11 +1,12 @@ package volume import ( + "context" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" volumetypes "github.com/docker/docker/api/types/volume" "github.com/docker/docker/client" - "golang.org/x/net/context" ) type fakeClient struct { diff --git a/cli/command/volume/create.go b/cli/command/volume/create.go index 5a1092266f..79bb9e31b8 100644 --- a/cli/command/volume/create.go +++ b/cli/command/volume/create.go @@ -1,6 +1,7 @@ package volume import ( + "context" "fmt" "github.com/docker/cli/cli" @@ -9,7 +10,6 @@ import ( volumetypes "github.com/docker/docker/api/types/volume" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type createOptions struct { diff --git a/cli/command/volume/inspect.go b/cli/command/volume/inspect.go index b8729e21cd..52cfb0f0a9 100644 --- a/cli/command/volume/inspect.go +++ b/cli/command/volume/inspect.go @@ -1,11 +1,12 @@ package volume import ( + "context" + "github.com/docker/cli/cli" "github.com/docker/cli/cli/command" "github.com/docker/cli/cli/command/inspect" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type inspectOptions struct { diff --git a/cli/command/volume/list.go b/cli/command/volume/list.go index d9b5ef80e3..55875e01d7 100644 --- a/cli/command/volume/list.go +++ b/cli/command/volume/list.go @@ -1,6 +1,7 @@ package volume import ( + "context" "sort" "github.com/docker/cli/cli" @@ -9,7 +10,6 @@ import ( "github.com/docker/cli/opts" "github.com/docker/docker/api/types" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type byVolumeName []*types.Volume diff --git a/cli/command/volume/prune.go b/cli/command/volume/prune.go index b3a70ec776..012c549f96 100644 --- a/cli/command/volume/prune.go +++ b/cli/command/volume/prune.go @@ -1,6 +1,7 @@ package volume import ( + "context" "fmt" "github.com/docker/cli/cli" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/opts" units "github.com/docker/go-units" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type pruneOptions struct { diff --git a/cli/command/volume/remove.go b/cli/command/volume/remove.go index b9d455da6a..66df3b8b50 100644 --- a/cli/command/volume/remove.go +++ b/cli/command/volume/remove.go @@ -1,6 +1,7 @@ package volume import ( + "context" "fmt" "strings" @@ -8,7 +9,6 @@ import ( "github.com/docker/cli/cli/command" "github.com/pkg/errors" "github.com/spf13/cobra" - "golang.org/x/net/context" ) type removeOptions struct { diff --git a/cli/compose/convert/service_test.go b/cli/compose/convert/service_test.go index 044b4e3e30..82c5ab665d 100644 --- a/cli/compose/convert/service_test.go +++ b/cli/compose/convert/service_test.go @@ -1,6 +1,7 @@ package convert import ( + "context" "os" "sort" "strings" @@ -15,7 +16,6 @@ import ( "github.com/gotestyourself/gotestyourself/assert" is "github.com/gotestyourself/gotestyourself/assert/cmp" "github.com/pkg/errors" - "golang.org/x/net/context" ) func TestConvertRestartPolicyFromNone(t *testing.T) { diff --git a/cli/registry/client/client.go b/cli/registry/client/client.go index 19d45a55f1..500245e6f3 100644 --- a/cli/registry/client/client.go +++ b/cli/registry/client/client.go @@ -1,6 +1,7 @@ package client import ( + "context" "fmt" "net/http" "strings" @@ -14,7 +15,6 @@ import ( "github.com/opencontainers/go-digest" "github.com/pkg/errors" "github.com/sirupsen/logrus" - "golang.org/x/net/context" ) // RegistryClient is a client used to communicate with a Docker distribution diff --git a/cli/registry/client/fetcher.go b/cli/registry/client/fetcher.go index 796bc01eb1..aea50a31fe 100644 --- a/cli/registry/client/fetcher.go +++ b/cli/registry/client/fetcher.go @@ -1,6 +1,7 @@ package client import ( + "context" "fmt" "github.com/docker/cli/cli/manifest/types" @@ -15,7 +16,6 @@ import ( digest "github.com/opencontainers/go-digest" "github.com/pkg/errors" "github.com/sirupsen/logrus" - "golang.org/x/net/context" ) // fetchManifest pulls a manifest from a registry and returns it. An error diff --git a/cli/trust/trust.go b/cli/trust/trust.go index 6b3f321da0..df11227e93 100644 --- a/cli/trust/trust.go +++ b/cli/trust/trust.go @@ -1,6 +1,7 @@ package trust import ( + "context" "encoding/json" "io" "net" @@ -31,7 +32,6 @@ import ( "github.com/theupdateframework/notary/trustpinning" "github.com/theupdateframework/notary/tuf/data" "github.com/theupdateframework/notary/tuf/signed" - "golang.org/x/net/context" ) var ( diff --git a/internal/test/network/client.go b/internal/test/network/client.go index d83288d619..5a65dcb5ed 100644 --- a/internal/test/network/client.go +++ b/internal/test/network/client.go @@ -1,10 +1,11 @@ package network import ( + "context" + "github.com/docker/docker/api/types" "github.com/docker/docker/api/types/filters" "github.com/docker/docker/api/types/network" - "golang.org/x/net/context" ) // FakeClient is a fake NetworkAPIClient