From 7ed011745a544873f40f806f1803cb8a4998ba01 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 26 Oct 2017 14:21:22 -0500 Subject: Remove more global refs / state (#7723) * remove more global refs / state * fix job enterprise initialization * fix api4 test compilation * saml api endpoints fix --- utils/config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'utils') 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() { -- cgit v1.2.3-1-g7c22