MCPcopy
hub / github.com/nats-io/nats.go / CompareAndDelete

Method CompareAndDelete

internal/syncx/map.go:66–68  ·  view source on GitHub ↗
(key K, value V)

Source from the content-addressed store, hash-verified

64}
65
66func (m *Map[K, V]) CompareAndDelete(key K, value V) bool {
67 return m.m.CompareAndDelete(key, value)
68}
69
70func (m *Map[K, V]) Swap(key K, value V) (V, bool) {
71 previous, loaded := m.m.Swap(key, value)

Callers 1

TestMapCompareAndDeleteFunction · 0.80

Calls

no outgoing calls

Tested by 1

TestMapCompareAndDeleteFunction · 0.64