MCPcopy Create free account
hub / github.com/GoEdgeLab/EdgeNode / GetOk

Method GetOk

internal/utils/sync/map_int.go:80–86  ·  view source on GitHub ↗
(k K)

Source from the content-addressed store, hash-verified

78}
79
80func (this *IntMap[K, V]) GetOk(k K) (value V, ok bool) {
81 var index = this.index(k)
82 this.lockers[index].RLock()
83 value, ok = this.m[index][k]
84 this.lockers[index].RUnlock()
85 return
86}
87
88func (this *IntMap[K, V]) Delete(k K) {
89 var index = this.index(k)

Callers

nothing calls this directly

Calls 3

indexMethod · 0.95
RLockMethod · 0.80
RUnlockMethod · 0.80

Tested by

no test coverage detected