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 <daniel@binaryparadox.net>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Junyang Shao <shaojunyang@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
Filippo Valsorda 2025-01-08 11:16:48 +01:00
parent 350118666d
commit 583d586ef9
1 changed files with 1 additions and 0 deletions

View File

@ -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)
}