MCPcopy Index your code
hub / github.com/aceld/zinx / Has

Method Has

zutils/shard_lock_map.go:132–138  ·  view source on GitHub ↗

Has Looks up an item under specified key

(key string)

Source from the content-addressed store, hash-verified

130
131// Has Looks up an item under specified key
132func (slm ShardLockMaps) Has(key string) bool {
133 shard := slm.GetShard(key)
134 shard.RLock()
135 _, ok := shard.items[key]
136 shard.RUnlock()
137 return ok
138}
139
140// Remove removes an element from the map.
141func (slm ShardLockMaps) Remove(key string) {

Callers 3

TestHasFunction · 0.95
TestRemoveCbFunction · 0.95
HasIdConnMethod · 0.80

Calls 1

GetShardMethod · 0.95

Tested by 2

TestHasFunction · 0.76
TestRemoveCbFunction · 0.76