aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2024-12-27 09:48:19 -0500
committerAustin Clements <austin@google.com>2024-12-27 08:33:09 -0800
commitac6acde8d13254fd77668062839320ba7d77659e (patch)
treef7f29e058405878a8bcaabeaf3354276b49093e8
parent539202f32b361523f2a18b1481bcd06a136a3c16 (diff)
downloadgo-x-website-ac6acde8d13254fd77668062839320ba7d77659e.tar.xz
_content/doc/go1.24: improve maphash section
Tighten the writing and give more context on why this is an interesting addition. Change-Id: I3b0a6690fc1e5d1bd8bcd1a047869af58bc449ed Reviewed-on: https://go-review.googlesource.com/c/website/+/638880 Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
-rw-r--r--_content/doc/go1.24.md6
1 files changed, 4 insertions, 2 deletions
diff --git a/_content/doc/go1.24.md b/_content/doc/go1.24.md
index 6f78ce3d..68dbbb3c 100644
--- a/_content/doc/go1.24.md
+++ b/_content/doc/go1.24.md
@@ -609,8 +609,10 @@ The values returned by [`New32`](/pkg/hash/fnv#New32), [`New32a`](/pkg/hash/fnv#
#### [`hash/maphash`](/pkg/hash/maphash/)
-New function [`Comparable`](/pkg/hash/maphash#Comparable) returns the hash of a comparable value.
-New function [`WriteComparable`](/pkg/hash/maphash#WriteComparable) adds a comparable value to the data hashed by a [`Hash`](/pkg/hash/maphash#Hash).
+The new [`Comparable`](/pkg/hash/maphash#Comparable) and
+[`WriteComparable`](/pkg/hash/maphash#WriteComparable) functions can compute the
+hash of any comparable value.
+These make it possible to hash anything that can be used as a Go map key.
#### [`log/slog`](/pkg/log/slog/)