diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2017-04-15 13:45:22 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2017-04-15 13:45:22 -0400 |
commit | 461a0b3b7c14cd59cb53eb66f419c965ab3bdd24 (patch) | |
tree | 88eea69d8963214fa43e8bf1a9989f2ab3d1c521 /utils | |
parent | 24667e3e5423dc939770d0b4bf06ed2f42b4a445 (diff) | |
download | chat-461a0b3b7c14cd59cb53eb66f419c965ab3bdd24.tar.gz chat-461a0b3b7c14cd59cb53eb66f419c965ab3bdd24.tar.bz2 chat-461a0b3b7c14cd59cb53eb66f419c965ab3bdd24.zip |
PLT-6113 Added initial unit tests for cmd package (#6086)
* Fixed app.CreateUser not using the provided locale
* Added initial unit tests for cmd package
* Disabled unit tests while we move to 'go build'
Diffstat (limited to 'utils')
-rw-r--r-- | utils/config.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/utils/config.go b/utils/config.go index 0e2bcfb1f..14f151d2d 100644 --- a/utils/config.go +++ b/utils/config.go @@ -66,6 +66,8 @@ func FindDir(dir string) string { fileName, _ = filepath.Abs("./" + dir + "/") } else if _, err := os.Stat("../" + dir + "/"); err == nil { fileName, _ = filepath.Abs("../" + dir + "/") + } else if _, err := os.Stat("../../" + dir + "/"); err == nil { + fileName, _ = filepath.Abs("../../" + dir + "/") } return fileName + "/" @@ -257,6 +259,7 @@ func LoadConfig(fileName string) { viper.SetConfigType("json") viper.AddConfigPath("./config") viper.AddConfigPath("../config") + viper.AddConfigPath("../../config") viper.AddConfigPath(".") configReadErr := viper.ReadInConfig() |