aboutsummaryrefslogtreecommitdiff
path: root/flag.go
diff options
context:
space:
mode:
authorMidnightRocket <[email protected]>2025-03-18 14:07:18 +0100
committerMidnightRocket <[email protected]>2025-03-18 15:17:18 +0100
commit9edfc8d416bea8aecfbdf0790a838f95ae133078 (patch)
treebc36aae6386440a7c1044e3b15a85965ecf7e691 /flag.go
parent5ca813443bd2a4d9f46a253ea0407d23b3790713 (diff)
Fix defaultIsZeroValue check for generic Value type
Diffstat (limited to 'flag.go')
-rw-r--r--flag.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/flag.go b/flag.go
index 7c058de..4bdbd0c 100644
--- a/flag.go
+++ b/flag.go
@@ -551,7 +551,7 @@ func (f *Flag) defaultIsZeroValue() bool {
case *intSliceValue, *stringSliceValue, *stringArrayValue:
return f.DefValue == "[]"
default:
- switch f.Value.String() {
+ switch f.DefValue {
case "false":
return true
case "<nil>":