mirror of
https://github.com/tailscale/tailscale.git
synced 2025-02-18 02:48:40 +00:00
syncs: add documentation to Map.Range
Updates #cleanup Signed-off-by: James Tucker <james@tailscale.com>
This commit is contained in:
parent
c3ab36cb9d
commit
d35ce1add9
@ -208,6 +208,8 @@ func (m *Map[K, V]) Delete(key K) {
|
||||
delete(m.m, key)
|
||||
}
|
||||
|
||||
// Range iterates over the map in undefined order calling f for each entry.
|
||||
// Iteration stops if f returns false. Map changes are blocked during iteration.
|
||||
func (m *Map[K, V]) Range(f func(key K, value V) bool) {
|
||||
m.mu.RLock()
|
||||
defer m.mu.RUnlock()
|
||||
|
Loading…
x
Reference in New Issue
Block a user