aboutsummaryrefslogtreecommitdiff
path: root/flag_test.go
diff options
context:
space:
mode:
authorTomas Aschan <[email protected]>2025-10-07 12:14:50 +0200
committerGitHub <[email protected]>2025-10-07 12:14:50 +0200
commit6fcfbc9910e1af538fde31db820be7d1bec231e4 (patch)
treeff40d07565c686e57f51a8e41b9da6851e00759b /flag_test.go
parentbe274af2a6d762e76dcb020967844bbcf3b3dbd4 (diff)
parent666b603e380566b3faf684b385848e6d9fc63004 (diff)
Merge pull request #453 from alimpfard/bool-flag-help
Show 'correct' explicit bool value syntax in help
Diffstat (limited to 'flag_test.go')
-rw-r--r--flag_test.go44
1 files changed, 22 insertions, 22 deletions
diff --git a/flag_test.go b/flag_test.go
index f8ee431..c60e344 100644
--- a/flag_test.go
+++ b/flag_test.go
@@ -1271,28 +1271,28 @@ func TestHiddenFlagUsage(t *testing.T) {
}
}
-const defaultOutput = ` --A for bootstrapping, allow 'any' type
- --Alongflagname disable bounds checking
- -C, --CCC a boolean defaulting to true (default true)
- --D path set relative path for local imports
- -E, --EEE num[=1234] a num with NoOptDefVal (default 4321)
- --F number a non-zero number (default 2.7)
- --G float a float that defaults to zero
- --IP ip IP address with no default
- --IPMask ipMask Netmask address with no default
- --IPNet ipNet IP network with no default
- --Ints ints int slice with zero default
- --N int a non-zero int (default 27)
- --ND1 string[="bar"] a string with NoOptDefVal (default "foo")
- --ND2 num[=4321] a num with NoOptDefVal (default 1234)
- --StringArray stringArray string array with zero default
- --StringSlice strings string slice with zero default
- --Z int an int that defaults to zero
- --custom custom custom Value implementation
- --custom-with-val custom custom value which has been set from command line while help is shown
- --customP custom a VarP with default (default 10)
- --maxT timeout set timeout for dial
- -v, --verbose count verbosity
+const defaultOutput = ` --A[=true|false] for bootstrapping, allow 'any' type
+ --Alongflagname[=true|false] disable bounds checking
+ -C, --CCC[=true|false] a boolean defaulting to true (default true)
+ --D path set relative path for local imports
+ -E, --EEE num[=1234] a num with NoOptDefVal (default 4321)
+ --F number a non-zero number (default 2.7)
+ --G float a float that defaults to zero
+ --IP ip IP address with no default
+ --IPMask ipMask Netmask address with no default
+ --IPNet ipNet IP network with no default
+ --Ints ints int slice with zero default
+ --N int a non-zero int (default 27)
+ --ND1 string[="bar"] a string with NoOptDefVal (default "foo")
+ --ND2 num[=4321] a num with NoOptDefVal (default 1234)
+ --StringArray stringArray string array with zero default
+ --StringSlice strings string slice with zero default
+ --Z int an int that defaults to zero
+ --custom custom custom Value implementation
+ --custom-with-val custom custom value which has been set from command line while help is shown
+ --customP custom a VarP with default (default 10)
+ --maxT timeout set timeout for dial
+ -v, --verbose count verbosity
`
// Custom value that satisfies the Value interface.