Delete removes the entry with the specified key from the SyncMap. If the key does not exist, this method does nothing.
(key string)
| 56 | // Delete removes the entry with the specified key from the SyncMap. |
| 57 | // If the key does not exist, this method does nothing. |
| 58 | func (sm *SyncMap) Delete(key string) { |
| 59 | sm.lock.Lock() |
| 60 | defer sm.lock.Unlock() |
| 61 | delete(*sm.mapObj, key) |
| 62 | } |
| 63 | |
| 64 | // NewSyncMap creates a new SyncMap with the specified maximum number of entries. |
| 65 | // If the maximum number of entries is less than or equal to 0, it will be set to 1. |
no outgoing calls