Has Looks up an item under specified key
(key string)
| 130 | |
| 131 | // Has Looks up an item under specified key |
| 132 | func (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. |
| 141 | func (slm ShardLockMaps) Remove(key string) { |