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
This was previously discussed in #7, but my tests are giving different results, If I define a variable in a file as an env var, the last backend on the list wins
Examples:
l := confita.NewLoader(file.NewBackend(path),env.NewBackend())
in this case the env backend overwrites the values in the file files
n := confita.NewLoader(env.NewBackend(),file.NewBackend(path))
same issue here, the file will overwrite any value previously set as env var
The docs say: "Confita scans a struct for config tags and calls all the backends one after another until the key is found" from my understanding once found it stops and continue looking for the next config key
This was previously discussed in #7, but my tests are giving different results, If I define a variable in a file as an env var, the last backend on the list wins
Examples:
l := confita.NewLoader(file.NewBackend(path),env.NewBackend())
in this case the env backend overwrites the values in the file files
n := confita.NewLoader(env.NewBackend(),file.NewBackend(path))
same issue here, the file will overwrite any value previously set as env var
The docs say: "Confita scans a struct for config tags and calls all the backends one after another until the key is found" from my understanding once found it stops and continue looking for the next config key
There is a working example of the issue:
https://play.golang.org/p/c8l9NbRnJOT
Thanks to @rogpeppe for your go playground example on issue 61
The text was updated successfully, but these errors were encountered: