go-arg
go-arg copied to clipboard
`int` with `arg:"env"` results in `strconv.ParseInt: parsing "": invalid syntax` if environment variable is empty
Not sure what it should do instead, since there is no NaN for integers.
Maybe allow *int which would result in nil?
Easiest would be to treat it as if it was undefined.
Yes I do think that an empty environment variable should result in the zero value, not an error. I may be able to look into this in next few weeks. Thank you for the report.
Should not the default value have taken effect if the env variable is empty?