File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -222,15 +222,6 @@ func (cli *DockerCli) HooksEnabled() bool {
222222 return false
223223}
224224
225- // WithInitializeClient is passed to DockerCli.Initialize by callers who wish to set a particular API Client for use by the CLI.
226- func WithInitializeClient (makeClient func (dockerCli * DockerCli ) (client.APIClient , error )) CLIOption {
227- return func (dockerCli * DockerCli ) error {
228- var err error
229- dockerCli .client , err = makeClient (dockerCli )
230- return err
231- }
232- }
233-
234225// Initialize the dockerCli runs initialization that must happen after command
235226// line flags are parsed.
236227func (cli * DockerCli ) Initialize (opts * cliflags.ClientOptions , ops ... CLIOption ) error {
Original file line number Diff line number Diff line change @@ -114,6 +114,16 @@ func WithAPIClient(c client.APIClient) CLIOption {
114114 }
115115}
116116
117+ // WithInitializeClient is passed to [DockerCli.Initialize] to initialize
118+ // an API Client for use by the CLI.
119+ func WithInitializeClient (makeClient func (* DockerCli ) (client.APIClient , error )) CLIOption {
120+ return func (cli * DockerCli ) error {
121+ var err error
122+ cli .client , err = makeClient (cli )
123+ return err
124+ }
125+ }
126+
117127// envOverrideHTTPHeaders is the name of the environment-variable that can be
118128// used to set custom HTTP headers to be sent by the client. This environment
119129// variable is the equivalent to the HttpHeaders field in the configuration
You can’t perform that action at this time.
0 commit comments