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

Function Lookup

internal/godebugs/table.go:61–78  ·  view source on GitHub ↗

Lookup returns the Info with the given name.

(name string)

Source from the content-addressed store, hash-verified

59
60// Lookup returns the Info with the given name.
61func Lookup(name string) *Info {
62 // binary search, avoiding import of sort.
63 lo := 0
64 hi := len(All)
65 for lo < hi {
66 m := int(uint(lo+hi) >> 1)
67 mid := All[m].Name
68 if name == mid {
69 return &All[m]
70 }
71 if name < mid {
72 hi = m
73 } else {
74 lo = m + 1
75 }
76 }
77 return nil
78}

Callers 1

lookupFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…