Code
Hub
Workspaces
Connect
Indexed graphs
Engine
MCP
copy
hub
/
github.com/nats-io/nats.go
/ Swap
Method
Swap
internal/syncx/map.go:70–73 ·
view source on GitHub ↗
(key K, value V)
Source
from the content-addressed store, hash-verified
68
}
69
70
func
(m *Map[K, V]) Swap(key K, value V) (V, bool) {
71
previous, loaded := m.m.Swap(key, value)
72
return
previous.(V), loaded
73
}
Callers
1
TestMapSwap
Function · 0.80
Calls
no outgoing calls
Tested by
1
TestMapSwap
Function · 0.64