Skip to content

Commit 3108083

Browse files
committed
Cobra's context should never be nil
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
1 parent 7580f63 commit 3108083

1 file changed

Lines changed: 0 additions & 4 deletions

File tree

cmd/docker/docker.go

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,10 +81,6 @@ func newDockerCommand(dockerCli *command.DockerCli) *cli.TopLevelCommand {
8181
cmd.SetOut(dockerCli.Out())
8282
cmd.SetErr(dockerCli.Err())
8383

84-
// Cobra's context may be nil in some cases, so initialize it here.
85-
ctx := context.TODO()
86-
cmd.SetContext(ctx)
87-
8884
opts, helpCmd = cli.SetupRootCommand(cmd)
8985
registerCompletionFuncForGlobalFlags(dockerCli, cmd)
9086
cmd.Flags().BoolP("version", "v", false, "Print version information and quit")

0 commit comments

Comments
 (0)