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
*NOTE [since 1.6]:* You can also have a file without an extension and specify the format programmatically. For those configuration files that lie in the home of the user without any extension like `.bashrc`
That line of the readme is a bit confusing. It took navigating the git blame history to find 9cd5712 and reviewing the commit in context for me to understand that it is saying a file named ~/.foo can be loaded as YAML when viper.SetConfigType("yaml") is used.
I was looking for a way to support the following file path possibilities:
/etc/foo/config.yaml
$HOME/.foo
$HOME/.foo.yaml
./.foo
./.foo.yaml
It's still not clear to me if I can support that list.
The text was updated successfully, but these errors were encountered:
A maintainer will take a look at your issue shortly. 👀
In the meantime: We are working on Viper v2 and we would love to hear your thoughts about what you like or don't like about Viper, so we can improve or fix those issues.
📣 If you've already given us your feedback, you can still help by spreading the news,
either by sharing the above link or telling people about this on Twitter:
@jsumners I don't think it's possible with the current implementation. I agree it's confusing, not very well explained and evolved in the wrong way over time.
I opened #1795 with a proposal for a better file searching API.
You could potentially play with supporting multiple file types if you wanted to.
What do you think? Would this suffice your needs? (Your feedback would be very helpful as I just started to work on this solution, so I'm looking to validate this new API)
viper/README.md
Line 144 in 5870123
That line of the readme is a bit confusing. It took navigating the git blame history to find 9cd5712 and reviewing the commit in context for me to understand that it is saying a file named
~/.foo
can be loaded as YAML whenviper.SetConfigType("yaml")
is used.I was looking for a way to support the following file path possibilities:
/etc/foo/config.yaml
$HOME/.foo
$HOME/.foo.yaml
./.foo
./.foo.yaml
It's still not clear to me if I can support that list.
The text was updated successfully, but these errors were encountered: