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 ca9171961..c8fe190e8 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 974b44ab8..45b4bd630 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 758aa6993..7b041cfe8 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 298adbaef..3f8944216 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 55a6c436d..820309568 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 d8ac647df..36d6f098e 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 fdb132184..2e19b7752 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 eb9f3c78a..04130313e 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 6976e5a07..d1515ec96 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 9d1673b62..dd2d89edb 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 c8eac11af..3240a5a3d 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 dca84d5dd..de96a3b7d 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 ed04920b1..a2c39bc6f 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 6fc527764..0a30f55d4 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 398917aae..ffb9a211c 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 7fe4c8f26..62d1a088a 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 04b4a8c43..39b71c806 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 258f3a860..c96f40559 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 d40c74fff..b4012a34c 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 dc2d586de..f0f67373d 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 b3ca2e6ad..78fbebe01 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 feaf2d13d..4f50e2a08 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 c4625b71b..feedbc011 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 bb27c1687..a79507e79 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 d8a765007..b5b526f2e 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 748901ac7..1118b7f0d 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 5aafd3497..83e16a98b 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 e144d8d7e..ba5f80553 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 b24c6f3fc..bc58ea202 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 a05e3b12d..6e02ee46d 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 16db5501e..2dcd4b6ac 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 5458f58f1..02ff71525 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 67b3bd509..2617e489f 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 d57e15de7..4efcb19e6 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 df5a048a0..2300ce5c4 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 10ffabf07..e29917543 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 86155da7e..526e1a5a0 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 a02377836..cb49ded8e 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 daaa0b707..7af4547fd 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 b91d77dcb..d641a5035 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 dbd85c0a4..f32926141 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 c4aa3eddc..de9d33a73 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 18c7a2523..8602e2539 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 f84683b90..c53cfc6a8 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 6088b64b5..3d1f71a09 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 0ef720a95..c4ab3fecd 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 1e87f1ee6..8265145fa 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 866e290e6..fb8764c64 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 b91eb7bd8..50e46f4ec 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 27782d107..11acc93d3 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 1f7189a95..cfa6a87b2 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 a510e3076..2044fcafd 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 6dada8252..2dd9786e9 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 6708599fd..6809c6203 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 41590e4ec..ada47df3b 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 84bf80416..9ac382c39 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 61e1b09d6..f05e81336 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 9266ca020..a4c72e444 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 9cae97b37..daa0dd8f7 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 2a50c127c..39d4caaf4 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 4dffff128..58adaac31 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 eb1b72324..07967c29a 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 fb2e54842..f2e54dcff 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 378aa8604..9082c56ed 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 c9e67fca4..efb528ecc 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 9ba503a80..06192fb38 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 a40d62d3d..0d752371c 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 e3c074add..a09069606 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 b8887c796..8d4bd3036 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 029499e93..33cec6e5c 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 9e925c344..7ff055aab 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 e4a96e90a..59e35ab1a 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 33bbdef5b..a8dda0a25 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 5d52a3078..3a0fa0fba 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 ab866cf2c..18bf4c7ba 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 9c1bc0906..5f15e6187 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 e4c2e5fb8..3d7543d9e 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 8a7c1f261..391919299 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 558f6cb2b..cdffcc645 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 879e2bd55..b00e5cd21 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 3de7bdad3..66f48197f 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 1f5cdc7ce..75a128cd4 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 f5d194352..f96c9a6bf 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 ffb4efe45..0dcb5db9b 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 7dac79566..d35ed0ea8 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 5212e596f..2450e6af3 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 d23ec2fb5..65e3cdc30 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 017cf7dcb..dbae49c6f 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 b54354276..07b4a06e2 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 fd22feef2..d6550edaa 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 b3f255e78..014d86b2b 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 ec051622c..19df1e7bd 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 66736ea87..9ce49eb90 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 88fecbfda..44e007f66 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 3ec6acf27..efbb0ffef 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 5dd039f8b..7df5a89de 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 e701baa85..a2092bd76 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 79c5feb66..724fdebfd 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 cb9a3947d..084d2b605 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 4cd57b0c3..7d5328d19 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 afb929e2c..9eb3f682c 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 cce626e58..ac84139f7 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 49ac0f43c..1af6fcd5c 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 33407b9f4..f6be9b316 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 bb4b412fc..ea672fa47 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 e4164cb0d..1739fefa9 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 51410487a..1afcb5211 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 7dc9a35f5..a778137e4 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 969b9ceb7..bdf47b77f 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 b1349844c..8d0d592ce 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 299cdc383..ca7aaba37 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 f328c7059..eb508e85f 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 8a9ddefe0..7f988fae5 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 63adce1ec..db4b03769 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 6286906f3..c84dd587f 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 13f150b75..107c9d215 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 e8f9718c7..69cecbbf0 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 6f69cbb47..254107071 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 adff48684..4b9cdd733 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 a1da43e97..0220f7e04 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 bb66849f5..80ee61e9f 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 38833b2e7..ee810b038 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 6e5620cbe..70795af94 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 d38b01b4b..5b656a7f3 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 c304a9912..b7453ccbb 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 ca9752a65..5fc8b729a 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 d64709325..ff746a042 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 bcb92db6c..c028d668c 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 105116fe5..7f9375e99 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 f599b7096..b90ca9acf 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 ee6a61784..e7d0cf482 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 c730f3a23..96d8c1ef5 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 08ea1ef6a..477a4427a 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 2903fd3c4..a3278b847 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 99800b4ae..6a108e5f1 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 c9fcc8ffc..fdc77afca 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 721f85d9c..ce90856fb 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 4b5941c25..5ae9afa22 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 aceb82dff..07b990adc 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 5535172e5..1aa619ecf 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 1d42b9499..8695c8951 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 91b827eb9..d9dadd61a 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 0f09527d0..d794000d9 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 b35efad8a..f8ed93cf0 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 c9b33fd0d..af6e0753b 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 0b84d239e..e72de1d2d 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 700a8ed53..7d0dce68a 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 4618de7de..be5d9ea28 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 4d751bbd4..52dc335fd 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 2500ddfea..20d8dc38c 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 5dde8e4c1..def5223fe 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 8977e5637..37de9722e 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 5e6171db7..73aeda632 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 6d079cd69..ef06f0997 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 e777501d8..7ad24e005 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 c8e3654cb..ef2ed263a 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 c704ce205..ea2182563 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 d04405c23..9aa849779 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 6526c28be..0f430e509 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 731d2de16..aa1cfed37 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 c29655cdb..833745d6d 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 5a1092266..79bb9e31b 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 b8729e21c..52cfb0f0a 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 d9b5ef80e..55875e01d 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 b3a70ec77..012c549f9 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 b9d455da6..66df3b8b5 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 044b4e3e3..82c5ab665 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 19d45a55f..500245e6f 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 796bc01eb..aea50a31f 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 6b3f321da..df11227e9 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 d83288d61..5a65dcb5e 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