minor cleanups
This commit is contained in:
parent
cc768447a7
commit
84e7a764db
5
parse.go
5
parse.go
|
@ -55,7 +55,7 @@ type spec struct {
|
||||||
help string
|
help string
|
||||||
env string
|
env string
|
||||||
boolean bool
|
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
|
// command represents a named subcommand, or the top-level command
|
||||||
|
@ -733,6 +733,5 @@ func isZero(v reflect.Value) bool {
|
||||||
if !t.Comparable() {
|
if !t.Comparable() {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
z := reflect.Zero(t)
|
return v.Interface() == reflect.Zero(t).Interface()
|
||||||
return v.Interface() == z.Interface()
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue