MCPcopy Index your code
hub / github.com/docker/cli / WithInitializeClient

Function WithInitializeClient

cli/command/cli_options.go:97–105  ·  view source on GitHub ↗

WithInitializeClient is passed to [DockerCli.Initialize] to initialize an API Client for use by the CLI.

(makeClient func(*DockerCli) (client.APIClient, error))

Source from the content-addressed store, hash-verified

95// WithInitializeClient is passed to [DockerCli.Initialize] to initialize
96// an API Client for use by the CLI.
97func WithInitializeClient(makeClient func(*DockerCli) (client.APIClient, error)) CLIOption {
98 return func(cli *DockerCli) error {
99 c, err := makeClient(cli)
100 if err != nil {
101 return err
102 }
103 return WithAPIClient(c)(cli)
104 }
105}
106
107// WithAPIClientOptions configures additional [client.Opt] to use when
108// initializing the API client. These options have no effect if a custom

Callers

nothing calls this directly

Calls 1

WithAPIClientFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…