WithInitializeClient is passed to [DockerCli.Initialize] to initialize an API Client for use by the CLI.
(makeClient func(*DockerCli) (client.APIClient, error))
| 95 | // WithInitializeClient is passed to [DockerCli.Initialize] to initialize |
| 96 | // an API Client for use by the CLI. |
| 97 | func 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 |
nothing calls this directly
no test coverage detected
searching dependent graphs…