aboutsummaryrefslogtreecommitdiff
path: root/flag.go
diff options
context:
space:
mode:
authorTomas Aschan <[email protected]>2025-04-01 22:50:37 +0200
committerGitHub <[email protected]>2025-04-01 22:50:37 +0200
commit19c9c4072e41218b18b93dbfc3798c18835d2fd5 (patch)
tree8b776ebe618ee95f5c1db63c1c4b71b3b35b0b60 /flag.go
parent5ca813443bd2a4d9f46a253ea0407d23b3790713 (diff)
parentc96309303407244840d6f2bc00ae32dc95390c25 (diff)
Merge pull request #422 from MidnightRocket/fix-default-is-zerovalue-for-generic-value-type
Fix defaultIsZeroValue check for generic Value types
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>":