From 7aafba0af037c89e9dbe0bdb74d0f1e6d5c279c7 Mon Sep 17 00:00:00 2001 From: Wouter Wijsman Date: Wed, 27 Oct 2021 11:32:42 +0200 Subject: [PATCH] Address confusing contradiction in README I just tested it and ``viper.SetConfigName("config.json")`` will not work. Yet the README both states it will and will not work 2 lines apart. This small PR addresses that. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9712e70..c0a2db5 100644 --- a/README.md +++ b/README.md @@ -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 does not have the extension in the name +viper.SetConfigType("yaml") // REQUIRED if the config file has an extension 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