Skip to content

Commit d0da194

Browse files
committed
remove WithContext in favor of WithBaseContext
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 4c30a1b commit d0da194

2 files changed

Lines changed: 1 addition & 10 deletions

File tree

cli/command/cli_options.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,3 @@ func WithAPIClient(c client.APIClient) CLIOption {
107107
return nil
108108
}
109109
}
110-
111-
// WithContext sets the base context for the cli
112-
// This is used internally for operations may require a context to propagate tracing.
113-
func WithContext(ctx context.Context) CLIOption {
114-
return func(cli *DockerCli) error {
115-
cli.baseCtx = ctx
116-
return nil
117-
}
118-
}

cmd/docker/docker.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ func newDockerCommand(dockerCli *command.DockerCli) *cli.TopLevelCommand {
8686

8787
ctx, _ := otel.Tracer("").Start(cmd.Context(), name)
8888
cmd.SetContext(ctx)
89-
_ = dockerCli.Apply(command.WithContext(ctx))
89+
_ = dockerCli.Apply(command.WithBaseContext(ctx))
9090
return nil
9191
},
9292
PersistentPostRun: func(cmd *cobra.Command, args []string) {

0 commit comments

Comments
 (0)