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

fix: merge camelCase properties from config file correctly with environment variables #231

Closed
wants to merge 1 commit into from

Conversation

doxsch
Copy link

@doxsch doxsch commented Dec 13, 2023

Small fix to get environment overrides working for camelCase config keys.

closes #179

@CLAassistant
Copy link

CLAassistant commented Dec 13, 2023

CLA assistant check
All committers have signed the CLA.

Comment on lines +64 to +67
err := k.Load(file.Provider(configFilepath), yaml.Parser(), koanf.WithMergeFunc(func(src, dest map[string]interface{}) error {
dest = src
return nil
}))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is only called if you actually provide a YAML config file and therefore this does not fix the referenced issue

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You are right. Thank you for the hint. I missed the fact that no config file was referenced in the linked issue. I just had a similar problem where I wanted to overwrite some values from the config file with individual environment variables. Should I create a new issue for this?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can add that to the issue, but the fix I proposed there would fix this as well

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.

ENDTOEND_ENABLE env value is not working
3 participants