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

a way to differentiate between blank and unset environmnet variables #237

Open
vikstrous opened this issue Sep 1, 2016 · 0 comments
Open

Comments

@vikstrous
Copy link

Right now I don't see any way to tell the different between an unset environment variable and one set to an empty string.

  • If I have a struct with pointers and use Unmarshal the members are never set to nil even if they are not present in the configs.
  • If I use IsSet it says that empty strings are not set.
  • I don't have a reliable way of getting the autogenerated names of environment variable names from AutomaticEnv() so I can't reliably check if they are set myself.

I don't know how I'm supposed to do this check. Any ideas?

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

1 participant