Skip to content

envconfig: optional nested separator for env keys - #232

Open
team-humaki wants to merge 1 commit into
kelseyhightower:masterfrom
team-humaki:nested-double-underscore
Open

team-humaki wants to merge 1 commit into
kelseyhightower:masterfrom
team-humaki:nested-double-underscore

Conversation

@team-humaki

Copy link
Copy Markdown

Fixes #223

Nested structs currently join prefix and field names with _, so UserName under Database becomes MYAPP_DATABASE_USER_NAME. That collides with split_words and with tools that treat __ as the hierarchy break.

ProcessWith takes Options.NestedSeparator. Empty keeps _. __ reads MYAPP__DATABASE__USER_NAME without changing Process.

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.

Support for separating the names of nested structs with a double underscore

1 participant