MCPcopy Create free account
hub / github.com/diillson/chatcli / ResetGlobalForTest

Function ResetGlobalForTest

config/manager.go:43–47  ·  view source on GitHub ↗

ResetGlobalForTest resets the singleton for test isolation. Must NOT be used in production code.

(logger *zap.Logger)

Source from the content-addressed store, hash-verified

41// ResetGlobalForTest resets the singleton for test isolation.
42// Must NOT be used in production code.
43func ResetGlobalForTest(logger *zap.Logger) *ConfigManager {
44 globalOnce = sync.Once{}
45 Global = nil
46 return InitGlobal(logger)
47}
48
49// New cria uma nova instância do ConfigManager.
50func New(logger *zap.Logger) *ConfigManager {

Callers 1

setupTestEnvFunction · 0.92

Calls 1

InitGlobalFunction · 0.85

Tested by 1

setupTestEnvFunction · 0.74