summaryrefslogtreecommitdiff
path: root/parse.go
diff options
context:
space:
mode:
authorAlex Flint <[email protected]>2019-10-19 23:30:33 -0700
committerAlex Flint <[email protected]>2019-10-19 23:30:33 -0700
commit84e7a764db3c0b7970633340bc988630a8dd5dc2 (patch)
tree97bd843645099051b02fb5c7887cdba2fbe68fac /parse.go
parentcc768447a7257b5957349efe0f7ecbaaa95f34f8 (diff)
minor cleanups
Diffstat (limited to 'parse.go')
-rw-r--r--parse.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/parse.go b/parse.go
index e630e4b..91bb35e 100644
--- a/parse.go
+++ b/parse.go
@@ -55,7 +55,7 @@ type spec struct {
help string
env string
boolean bool
- defaultVal string // default value for this option, only if provided as a struct tag
+ defaultVal string // default value for this option
}
// command represents a named subcommand, or the top-level command
@@ -733,6 +733,5 @@ func isZero(v reflect.Value) bool {
if !t.Comparable() {
return false
}
- z := reflect.Zero(t)
- return v.Interface() == z.Interface()
+ return v.Interface() == reflect.Zero(t).Interface()
}