-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
altsrc newYamlSourceFromFlagFunc example not working. #570
Comments
Hi @jameskyle, I'm having trouble reproducing this with the following:
Would you be able to provide the source of |
Here is my main.go. Flags values are not retrieved from YAML.
Output:
|
Hi @iiezhachenko, Apologies for the delay.
Actually returns a function to be called so you would need to call it in your function with something like:
The typical usage of
Let me know if this helps! |
Hiya! There's a known issue with the current implementation of the CLI, where altsrc is generally clunky and poorly documented. My current idea is that I'm going to move all of the |
If I understand the purpose of the altsrc lib, it should use the passed in config file to populate flag parameters. I took the example for altsrc, fixed the gopkg.in compile errors, and passed in a yaml that looks like:
Then compiled with:
But the flag is never set. I modified the Action func to look like:
If I pass it on the cli, it is set. e.g.
The text was updated successfully, but these errors were encountered: