You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think you might be expecting Module.ConfigFile to only load config for Module, but that's not how it works. Config file keys are global in all existing configuration loaders, not scoped to sub-structures, so the correct keys would be module.val1 etc.
Because they're global it also doesn't help to have ConfigFile underneath Module.
I think you could probably achieve what you want by writing your own custom resolver.
The following examples:
With a config file that looks like
When run with the command
go run main.go --module.config-file ./config.json
Will output:
Am I doing something wrong ? Or this is a bug/side effect ?
The text was updated successfully, but these errors were encountered: