Skip to content

Commit

Permalink
Omit default from usage if DefValue is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamSLevy committed Apr 24, 2019
1 parent 24fa697 commit cd7c100
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,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>":
Expand Down

0 comments on commit cd7c100

Please sign in to comment.