style: replace GetConfig() with variable C_globalConfig

This commit is contained in:
2026-09-02 21:24:27 +08:00
parent bf4cdf0d88
commit 16341972af
13 changed files with 44 additions and 49 deletions
+3 -3
View File
@@ -77,7 +77,7 @@ func (m *Manager) ShowBotInitMessage() {
m.mu.RLock()
defer m.mu.RUnlock()
cfg := config.GetGlobalConfig()
cfg := config.C_globalConfig
params := template.BuildBotInitializationMsgParams()
message := template.Render(cfg.ControllerMessage.BotStarted, params)
@@ -102,7 +102,7 @@ func (m *Manager) ShowBotServerList() {
m.mu.RLock()
defer m.mu.RUnlock()
cfg := config.GetGlobalConfig()
cfg := config.C_globalConfig
params := template.BuildParamsFromServerList()
message := template.Render(cfg.ControllerMessage.ServerList, params)
@@ -125,7 +125,7 @@ func (m *Manager) NotifyStatusChange(change node.StatusChange) {
m.mu.RLock()
defer m.mu.RUnlock()
cfg := config.GetGlobalConfig()
cfg := config.C_globalConfig
templateStr := cfg.ControllerMessage.ServerStatusChanged
params := template.BuildParamsFromStatusChange(change)