Update SetConfigType example

Seems it's always required.
This commit is contained in:
Wouter Wijsman 2021-10-27 14:14:16 +02:00 committed by GitHub
parent 7aafba0af0
commit fc6736c260
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,7 +113,7 @@ where a configuration file is expected.
```go
viper.SetConfigName("config") // name of config file (without extension)
viper.SetConfigType("yaml") // REQUIRED if the config file has an extension
viper.SetConfigType("yaml") // REQUIRED
viper.AddConfigPath("/etc/appname/") // path to look for the config file in
viper.AddConfigPath("$HOME/.appname") // call multiple times to add many search paths
viper.AddConfigPath(".") // optionally look for config in the working directory