MCPcopy Create free account
hub / github.com/imroc/req / lookup

Function lookup

internal/godebug/godebug.go:151–164  ·  view source on GitHub ↗

lookup returns the unique *setting value for the given name.

(name string)

Source from the content-addressed store, hash-verified

149
150// lookup returns the unique *setting value for the given name.
151func lookup(name string) *setting {
152 if v, ok := cache.Load(name); ok {
153 return v.(*setting)
154 }
155 s := new(setting)
156 s.info = godebugs.Lookup(name)
157 s.value.Store(&empty)
158 if v, loaded := cache.LoadOrStore(name, s); loaded {
159 // Lost race: someone else created it. Use theirs.
160 return v.(*setting)
161 }
162
163 return s
164}
165
166func newIncNonDefault(name string) func() {
167 s := New(name)

Callers 2

ValueMethod · 0.85
parseFunction · 0.85

Calls 2

LookupFunction · 0.92
LoadMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…