MCPcopy
hub / github.com/dropbox/godropbox / Delete

Method Delete

container/concurrent/lockstore/map.go:98–106  ·  view source on GitHub ↗

Delete removes a key from the map if it exists. Returns nothing.

(key string)

Source from the content-addressed store, hash-verified

96
97// Delete removes a key from the map if it exists. Returns nothing.
98func (m *lockingMap) Delete(key string) {
99 m.keyLocker.Lock(key)
100 defer m.keyLocker.Unlock(key)
101
102 m.lock.Lock()
103 defer m.lock.Unlock()
104
105 delete(m.data, key)
106}
107
108// AddOrGet returns the current value. You must pass in a LockingMapAddFunc
109// as the second parameter: if the key you are requesting is not present in the

Callers

nothing calls this directly

Calls 2

LockMethod · 0.65
UnlockMethod · 0.65

Tested by

no test coverage detected