Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

int with arg:"env" results in strconv.ParseInt: parsing "": invalid syntax if environment variable is empty #160

Open
nyetwurk opened this issue Jul 24, 2021 · 2 comments

Comments

@nyetwurk
Copy link

nyetwurk commented Jul 24, 2021

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.

@alexflint
Copy link
Owner

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.

@dyfet
Copy link

dyfet commented Dec 27, 2021

Should not the default value have taken effect if the env variable is empty?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants