You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-aaa string
Set aaa
-bbb string
Set bbb (default "0")
-ccc string
Set ccc (default "1")
What did you see instead?
-aaa string
Set aaa
-bbb string
Set bbb
-ccc string
Set ccc (default "1")
This is fairly explicit in the relevant code, flag.isZeroValue. The documentation says that "The parenthetical default is omitted if the default is the zero value for the type," but "0" is not the zero value of string.
The text was updated successfully, but these errors were encountered:
I believe that the switch statement in isZeroValue is not needed, I can't create a reproduction case that fails the top part and needs the switch case.
What version of Go are you using (
go version
)?go version go1.9.3 darwin/amd64
Does this issue reproduce with the latest release?
Yes.
What operating system and processor architecture are you using (
go env
)?darwin/amd64
What did you do?
https://play.golang.org/p/F1sa0z0p9V1:
What did you expect to see?
What did you see instead?
This is fairly explicit in the relevant code,
flag.isZeroValue
. The documentation says that "The parenthetical default is omitted if the default is the zero value for the type," but "0" is not the zero value of string.The text was updated successfully, but these errors were encountered: