diff --git a/cli/command/checkpoint/client_test.go b/cli/command/checkpoint/client_test.go index ca9171961755..c8fe190e8329 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 974b44ab83d4..45b4bd6308c0 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 758aa699364c..7b041cfe8990 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 298adbaef78e..3f894421632d 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 55a6c436d449..8203095682b7 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 d8ac647dfa45..36d6f098ec72 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 fdb132184788..2e19b7752100 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 eb9f3c78aad2..04130313e618 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 6976e5a079d2..d1515ec962ae 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 9d1673b62cfb..dd2d89edb6f0 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 c8eac11af10c..3240a5a3de6c 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 dca84d5ddb7e..de96a3b7d870 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 ed04920b16e2..a2c39bc6ff81 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 6fc5277645ec..0a30f55d45f8 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 398917aae0a3..ffb9a211c2d1 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 7fe4c8f260a2..62d1a088aa78 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 04b4a8c431e3..39b71c80624a 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 258f3a860a74..c96f40559435 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 d40c74fff37c..b4012a34c02d 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 dc2d586def1b..f0f67373d7a2 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 b3ca2e6ad587..78fbebe01770 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 feaf2d13d711..4f50e2a0809e 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 c4625b71b22f..feedbc01114b 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 bb27c1687c96..a79507e792cb 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 d8a76500749c..b5b526f2e220 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 748901ac7d66..1118b7f0d454 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 5aafd3497756..83e16a98b762 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 e144d8d7eaa7..ba5f805534d5 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 b24c6f3fc3d5..bc58ea202942 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 a05e3b12dda5..6e02ee46d1cc 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 16db5501e0e2..2dcd4b6ace94 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 5458f58f1abd..d2ca58739f85 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 { @@ -157,6 +157,7 @@ func runContainer(dockerCli command.Cli, opts *runOptions, copts *containerOptio } ctx, cancelFun := context.WithCancel(context.Background()) + defer cancelFun() createResponse, err := createContainer(ctx, dockerCli, containerConfig, &opts.createOptions) if err != nil { diff --git a/cli/command/container/start.go b/cli/command/container/start.go index 67b3bd509ccb..243097c0cdcc 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 { @@ -55,6 +55,7 @@ func NewStartCommand(dockerCli command.Cli) *cobra.Command { // nolint: gocyclo func runStart(dockerCli command.Cli, opts *startOptions) error { ctx, cancelFun := context.WithCancel(context.Background()) + defer cancelFun() if opts.attach || opts.openStdin { // We're going to attach to a container. diff --git a/cli/command/container/stats.go b/cli/command/container/stats.go index d57e15de722f..4efcb19e6568 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 df5a048a0b88..2300ce5c43b8 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 10ffabf07c1d..e299175436fa 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 86155da7eb00..526e1a5a0c4e 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 a02377836466..cb49ded8ef4f 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 daaa0b707dcd..7af4547fdbdd 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 b91d77dcbca7..d641a503553d 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 dbd85c0a40b8..f32926141710 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 c4aa3eddc7ff..de9d33a734ef 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 18c7a2523cfd..8602e2539815 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 f84683b90740..c53cfc6a8bd9 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 6088b64b59ef..3d1f71a099b3 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 0ef720a95c22..c4ab3fecd484 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 1e87f1ee6a7e..8265145fa546 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 866e290e69e0..fb8764c64d33 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 b91eb7bd8450..50e46f4ec126 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 27782d107ade..11acc93d315b 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 1f7189a95b0a..cfa6a87b2dcb 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 a510e307641d..2044fcafdfa2 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 6dada82525e8..2dd9786e962f 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 6708599fd777..6809c6203a10 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 41590e4ecb0b..ada47df3bbb9 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 84bf80416504..9ac382c39535 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 61e1b09d62a6..f05e81336019 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 9266ca020e7f..a4c72e444f74 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 9cae97b3709c..daa0dd8f72d9 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 2a50c127c425..39d4caaf43e6 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 4dffff128956..58adaac31b6c 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 eb1b72324e4e..07967c29abc1 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 fb2e5484279f..f2e54dcff6d9 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 378aa86041e4..9082c56ed3de 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 c9e67fca491c..efb528eccaee 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 9ba503a80ee0..06192fb38dda 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 a40d62d3dce9..0d752371c5b9 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 e3c074add2bd..a09069606b63 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 b8887c7968a3..8d4bd3036456 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 029499e93d91..33cec6e5c5a2 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 9e925c344438..7ff055aaba88 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 e4a96e90a8e6..59e35ab1ae7e 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 33bbdef5bec8..a8dda0a25819 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 5d52a3078b25..3a0fa0fba97c 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 ab866cf2c150..18bf4c7ba190 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 9c1bc0906f9e..5f15e618770f 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 e4c2e5fb8929..3d7543d9eb71 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 8a7c1f261d4a..391919299e78 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 558f6cb2bafb..cdffcc645996 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 879e2bd55465..b00e5cd21f03 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 3de7bdad3818..66f48197f2f5 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 1f5cdc7ceec9..75a128cd4601 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 f5d194352f5e..f96c9a6bf31f 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 ffb4efe459e6..0dcb5db9b18f 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 7dac795663df..d35ed0ea8f9e 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 5212e596f3a7..2450e6af3996 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 d23ec2fb5c6d..65e3cdc30ada 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 017cf7dcb5ab..dbae49c6f03f 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 b54354276403..07b4a06e28af 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 fd22feef203e..d6550edaaa54 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 b3f255e78757..014d86b2b89c 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 ec051622cd77..19df1e7bd2ad 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 66736ea87380..9ce49eb908e1 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 88fecbfda090..44e007f66d4b 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 3ec6acf272c8..efbb0ffef418 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 5dd039f8bff9..7df5a89de677 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 e701baa85020..a2092bd76b67 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 79c5feb66f16..724fdebfd517 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 cb9a3947da8c..084d2b605562 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 4cd57b0c332e..7d5328d1993c 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 afb929e2c8d8..9eb3f682c105 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 cce626e58aa8..ac84139f7efc 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 49ac0f43cf04..1af6fcd5cef8 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 33407b9f442f..f6be9b316b49 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 bb4b412fc2bb..ea672fa47386 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 e4164cb0d2ec..1739fefa9ca2 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 51410487a51d..1afcb5211fc8 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 7dc9a35f5fff..a778137e48b7 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 969b9ceb751f..bdf47b77fa0b 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 b1349844c9a2..8d0d592cec13 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 299cdc383f10..ca7aaba3764f 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 f328c7059aff..eb508e85fbfe 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 8a9ddefe07e7..7f988fae569c 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 63adce1ec165..db4b0376940d 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 6286906f322a..c84dd587fdfe 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 13f150b750a7..107c9d2153f4 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 e8f9718c7c3d..69cecbbf02e7 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 6f69cbb47fa6..254107071fd1 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 adff4868480c..4b9cdd733769 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 a1da43e97314..0220f7e04137 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 bb66849f5580..80ee61e9f7b4 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 38833b2e7e53..ee810b03889f 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 6e5620cbe7d8..70795af9459f 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 d38b01b4b51d..5b656a7f33e3 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 c304a99124b2..b7453ccbb945 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 ca9752a65624..5fc8b729a732 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 d64709325475..ff746a04205d 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 bcb92db6c9c3..c028d668cff4 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 105116fe57f7..7f9375e99f89 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 f599b7096b10..b90ca9acfa9f 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 ee6a61784fec..e7d0cf482d73 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 c730f3a2317e..96d8c1ef5c6d 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 08ea1ef6aa9d..477a4427aa1d 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 2903fd3c4202..a3278b847965 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 99800b4ae27a..6a108e5f1616 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 c9fcc8ffc5e8..fdc77afcae29 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 721f85d9c370..ce90856fbec4 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 4b5941c252d6..5ae9afa229c7 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 aceb82dff28b..07b990adc8b7 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 5535172e5952..1aa619ecf357 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 1d42b9499c6f..8695c89518bf 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 91b827eb976b..d9dadd61af8e 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 0f09527d078c..d794000d95a5 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 b35efad8a932..f8ed93cf002c 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 c9b33fd0de85..af6e0753b599 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 0b84d239e389..e72de1d2d7f3 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 700a8ed53323..7d0dce68ae1a 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 4618de7dea97..be5d9ea28434 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 4d751bbd4ea3..52dc335fdc54 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 2500ddfeac14..20d8dc38cc3a 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 5dde8e4c1236..def5223feb07 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 8977e563725c..37de9722eac7 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 5e6171db7d2d..73aeda632f6b 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 6d079cd69ea4..ef06f099747a 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 e777501d89e1..7ad24e005e0e 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 c8e3654cbd59..ef2ed263a5e6 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 c704ce205101..ea2182563f2a 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 d04405c236fb..9aa849779a35 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 6526c28bebe7..0f430e509ec4 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 731d2de16f84..aa1cfed37089 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 c29655cdb0ff..833745d6d29d 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 5a1092266fe3..79bb9e31b865 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 b8729e21cd2f..52cfb0f0a993 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 d9b5ef80e3da..55875e01d74e 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 b3a70ec77637..012c549f965a 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 b9d455da6ab6..66df3b8b5044 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 044b4e3e30ac..82c5ab665d29 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 19d45a55f1d7..500245e6f3c2 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 796bc01eb1d3..aea50a31fe16 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 6b3f321da02d..df11227e9341 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 d83288d619ec..5a65dcb5ed1b 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