Skip to content

Commit

Permalink
sync: document behavior of Map.Delete when key is not present
Browse files Browse the repository at this point in the history
Change-Id: I6a6a465631e91141a5fcc9c04a7df0dc47780731
Reviewed-on: https://go-review.googlesource.com/c/go/+/643955
Reviewed-by: Daniel McCarney <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
Reviewed-by: Junyang Shao <[email protected]>
Reviewed-by: Michael Pratt <[email protected]>
  • Loading branch information
FiloSottile committed Mar 5, 2025
1 parent 3501186 commit 583d586
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/sync/hashtriemap.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 583d586

Please sign in to comment.