Skip to content

Commit 6f048ef

Browse files
authored
Update loader.go
1 parent 5bc7765 commit 6f048ef

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

internals/config/loader.go

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,14 @@ func Normalize(config *configutils.Config, path string, structure any) {
114114
}
115115

116116
func InitReload() {
117-
defaultsConf.OnLoad(Load)
118-
userConf.OnLoad(Load)
119-
tokenConf.OnLoad(Load)
117+
reload := func() {
118+
Load()
119+
Log()
120+
}
121+
122+
defaultsConf.OnLoad(reload)
123+
userConf.OnLoad(reload)
124+
tokenConf.OnLoad(reload)
120125
}
121126

122127
func InitEnv() {
@@ -155,4 +160,4 @@ func LoadConfig() {
155160

156161
log.Error("Could not Load Config ", ENV.CONFIG_PATH, ": ", err.Error())
157162
}
158-
}
163+
}

0 commit comments

Comments
 (0)