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

feat: have a full key when missing config #216

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tomMoulard
Copy link

This PR makes the error better when returned on a missing configuration.

For example, if you have a config like this:

var config struct {
	Bar struct {
		Foo string `envconfig:"FOO" required:"true"`
	} `envconfig:"BAR"`
}

The error goes from

required key FOO missing value

To:

required key ENV_CONFIG_BAR_FOO missing value

Thanks again for your project(s) !

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.

1 participant