| commit | 40762f75412949b579990808c29217ed19a4b320 | [log] [tgz] |
|---|---|---|
| author | Kiril Zvezdarov <kzvezdarov@monetate.com> | Sat Mar 28 13:36:55 2015 -0400 |
| committer | Kiril Zvezdarov <kzvezdarov@monetate.com> | Thu Apr 02 17:07:32 2015 -0400 |
| tree | 6fc86368f9f99b3e1a5d1f88e1b41a5f23a0cb3e | |
| parent | c861bdefb7e99feac876a9c3c7673e73f634842d [diff] |
Current working directory is added to the config search paths by default
diff --git a/viper.go b/viper.go index 7099b9c..6c249fe 100644 --- a/viper.go +++ b/viper.go
@@ -143,6 +143,13 @@ v.env = make(map[string]string) v.aliases = make(map[string]string) + wd, err := os.Getwd() + if err != nil { + jww.INFO.Println("Could not add cwd to search paths", err) + } else { + v.AddConfigPath(wd) + } + return v }