MCPcopy Create free account
hub / github.com/blues/note / debugEnvInit

Function debugEnvInit

lib/debug.go:42–60  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

40var debugEnvInitMutex sync.Mutex
41
42func debugEnvInit() {
43 // Only one goroutine in initialization at a time
44 if debugEnvInitialized {
45 return
46 }
47 debugEnvInitMutex.Lock()
48 defer debugEnvInitMutex.Unlock()
49 if debugEnvInitialized {
50 return
51 }
52 // Initialzie from environment variables
53 for i := range text {
54 avail, value := debugEnv(text[i])
55 if avail {
56 *(vars[i]) = value
57 }
58 }
59 debugEnvInitialized = true
60}
61
62// DebugSet sets the debug variable
63func DebugSet(which string, value string) {

Callers 5

OpenNoteboxFunction · 0.85
InitLoggingFunction · 0.85
defaultLoggerInitFunction · 0.85
HubSetDiscoverFunction · 0.85

Calls 1

debugEnvFunction · 0.85

Tested by

no test coverage detected