Skip to content

Unclear doc #1777

Open
Open
@jsumners

Description

viper/README.md

Line 144 in 5870123

*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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    kind/bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions