summaryrefslogtreecommitdiffstats
path: root/utils/config.go
diff options
context:
space:
mode:
authorChris <ccbrown112@gmail.com>2017-10-26 14:21:22 -0500
committerJoram Wilander <jwawilander@gmail.com>2017-10-26 15:21:22 -0400
commit7ed011745a544873f40f806f1803cb8a4998ba01 (patch)
treefe13919b050b33c8dd3f6ca5fce6ad1980b2dd3e /utils/config.go
parenta0bfd2885d03e3f9fb6b3cdd6ba60eea93c848b2 (diff)
downloadchat-7ed011745a544873f40f806f1803cb8a4998ba01.tar.gz
chat-7ed011745a544873f40f806f1803cb8a4998ba01.tar.bz2
chat-7ed011745a544873f40f806f1803cb8a4998ba01.zip
Remove more global refs / state (#7723)
* remove more global refs / state * fix job enterprise initialization * fix api4 test compilation * saml api endpoints fix
Diffstat (limited to 'utils/config.go')
-rw-r--r--utils/config.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/config.go b/utils/config.go
index 8611be975..7b7a111d6 100644
--- a/utils/config.go
+++ b/utils/config.go
@@ -285,7 +285,7 @@ func InitAndLoadConfig(filename string) error {
// LoadConfig will try to search around for the corresponding config file.
// It will search /tmp/fileName then attempt ./config/fileName,
// then ../config/fileName and last it will look at fileName
-func LoadConfig(fileName string) {
+func LoadConfig(fileName string) *model.Config {
cfgMutex.Lock()
defer cfgMutex.Unlock()
@@ -394,6 +394,8 @@ func LoadConfig(fileName string) {
for _, listener := range cfgListeners {
listener(&oldConfig, &config)
}
+
+ return &config
}
func RegenerateClientConfig() {