cli/e2e/cli-plugins
Sebastiaan van Stijn f14eeeb361
cli/flags: add "hostVar" to handle --host / -H as a single string
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]: 7eab668982/cli/command/cli.go (L542-L551)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2025-08-18 11:01:39 +02:00
..
plugins move cli-plugins metadata types/consts to a separate package 2025-03-07 12:38:06 +01:00
testdata Remove preceding white space from cobra help template 2025-02-10 10:51:25 +01:00
config_test.go cli-plugins: minor cleanups: use Println 2025-02-03 12:18:07 +01:00
dial_test.go move cli-plugins metadata types/consts to a separate package 2025-03-07 12:38:06 +01:00
flags_test.go cli/flags: add "hostVar" to handle --host / -H as a single string 2025-08-18 11:01:39 +02:00
help_test.go e2e/cli-plugins: use regexp.Compile to prevent panic in tests 2025-04-10 12:22:26 +02:00
main_test.go e2e: Add a TestMain for cli plugins tests 2019-04-03 15:06:34 +01:00
run_test.go cli-plugins: minor cleanups: use Println 2025-02-03 12:18:07 +01:00
socket_test.go golangci-lint: enable mirror linter 2025-05-19 20:07:05 +02:00
util_test.go golangci-lint: enable thelper linter 2023-11-20 16:02:17 +01:00