MCPcopy
hub / github.com/uber-go/nilaway / Load

Method Load

util/orderedmap/orderedmap.go:66–74  ·  view source on GitHub ↗

Load returns the value stored in the map for the key, with an additional bool indicating if the key was found.

(key K)

Source from the content-addressed store, hash-verified

64// Load returns the value stored in the map for the key, with an additional bool indicating if
65// the key was found.
66func (m *OrderedMap[K, V]) Load(key K) (V, bool) {
67 m.rehydrate()
68
69 if p := m.inner[key]; p != nil {
70 return p.Value, true
71 }
72 var v V
73 return v, false
74}
75
76// Store stores the value in the map for the key, overwriting the previous value if the key exists.
77func (m *OrderedMap[K, V]) Store(key K, value V) {

Callers 5

CollectGroundTruthsFunction · 0.45
TestLoadStoreFunction · 0.45
TestStoringInterfacesFunction · 0.45
TestEncodingFunction · 0.45

Calls 1

rehydrateMethod · 0.95

Tested by 4

TestLoadStoreFunction · 0.36
TestStoringInterfacesFunction · 0.36
TestEncodingFunction · 0.36