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

Support multiple env struct tags #6

Merged
merged 2 commits into from
Mar 12, 2020
Merged

Conversation

hinshun
Copy link
Contributor

@hinshun hinshun commented Mar 12, 2020

For the given example:

type Foo struct {
    Value `env:"foo,bar"`
}

When unmarshalling, then Foo.Value will get the value of $foo if its set, otherwise $bar. (And so on if there's more env keys)

When marshalling, then both $foo and $bar are set with the value of Foo.Value.

@hinshun hinshun merged commit 986dfe8 into Netflix:master Mar 12, 2020
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

Successfully merging this pull request may close these issues.

2 participants