WithUserAgent configures the User-Agent string for cli HTTP requests.
(userAgent string)
| 227 | |
| 228 | // WithUserAgent configures the User-Agent string for cli HTTP requests. |
| 229 | func WithUserAgent(userAgent string) CLIOption { |
| 230 | return func(cli *DockerCli) error { |
| 231 | if userAgent == "" { |
| 232 | return errors.New("user agent cannot be blank") |
| 233 | } |
| 234 | cli.clientOpts = append(cli.clientOpts, client.WithUserAgent(userAgent)) |
| 235 | return nil |
| 236 | } |
| 237 | } |
no outgoing calls
searching dependent graphs…