mirror of https://github.com/docker/cli.git
hostVar is used for the '--host' / '-H' flag to set [ClientOptions.Hosts]. The [ClientOptions.Hosts] field is a slice because it was originally shared with the daemon config. However, the CLI only allows for a single host to be specified. hostVar presents itself as a "string", but stores the value in a string slice. It produces an error when trying to set multiple values, matching the check in [getServerHost]. [getServerHost]: |
||
|---|---|---|
| .. | ||
| plugins | ||
| testdata | ||
| config_test.go | ||
| dial_test.go | ||
| flags_test.go | ||
| help_test.go | ||
| main_test.go | ||
| run_test.go | ||
| socket_test.go | ||
| util_test.go | ||