From: Filippo Valsorda Date: Wed, 8 Jan 2025 10:16:48 +0000 (+0100) Subject: sync: document behavior of Map.Delete when key is not present X-Git-Tag: go1.25rc1~834 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=583d586ef9bffec9a916cf4bc6880a593dd88560;p=gostls13.git sync: document behavior of Map.Delete when key is not present Change-Id: I6a6a465631e91141a5fcc9c04a7df0dc47780731 Reviewed-on: https://go-review.googlesource.com/c/go/+/643955 Reviewed-by: Daniel McCarney LUCI-TryBot-Result: Go LUCI Reviewed-by: Junyang Shao Reviewed-by: Michael Pratt --- diff --git a/src/sync/hashtriemap.go b/src/sync/hashtriemap.go index 8df0e2b567..ce30f590bb 100644 --- a/src/sync/hashtriemap.go +++ b/src/sync/hashtriemap.go @@ -74,6 +74,7 @@ func (m *Map) LoadAndDelete(key any) (value any, loaded bool) { } // Delete deletes the value for a key. +// If the key is not in the map, Delete does nothing. func (m *Map) Delete(key any) { m.m.Delete(key) }