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

Impossible to get a value from env #30

Closed
yaziine opened this issue Jul 16, 2018 · 0 comments
Closed

Impossible to get a value from env #30

yaziine opened this issue Jul 16, 2018 · 0 comments
Labels

Comments

@yaziine
Copy link

yaziine commented Jul 16, 2018

This bug is introduced since the last release.

Here how to reproduce:

type Config struct {
	Host string `config:"host,required"`
}

func main() {
	var cfg Config
	l := confita.NewLoader(env.NewBackend(), flags.NewBackend())
	_ = l.Load(context.Background(), &cfg)
}

When trying to execute the code above I have:

$> HOST=localhost go run main.go
required key 'host' for field 'Host' not found
exit status 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant