InitGlobal initializes the global ConfigManager singleton (thread-safe). Subsequent calls are no-ops — use Global.Reload() to refresh configuration.
(logger *zap.Logger)
| 32 | // InitGlobal initializes the global ConfigManager singleton (thread-safe). |
| 33 | // Subsequent calls are no-ops — use Global.Reload() to refresh configuration. |
| 34 | func InitGlobal(logger *zap.Logger) *ConfigManager { |
| 35 | globalOnce.Do(func() { |
| 36 | Global = New(logger) |
| 37 | }) |
| 38 | return Global |
| 39 | } |
| 40 | |
| 41 | // ResetGlobalForTest resets the singleton for test isolation. |
| 42 | // Must NOT be used in production code. |
no test coverage detected