|
*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.
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
~/.foocan 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.yamlIt's still not clear to me if I can support that list.