From 72e2220b50db5179ddca2226a64bf1d3aa94f49a Mon Sep 17 00:00:00 2001 From: Jes Cok Date: Tue, 18 Jun 2024 23:43:21 +0800 Subject: encoding/json: clarify the map's key type for Unmarshal While here, also fix doc link for encoding.TextMarshaler. Fixes #67495 Change-Id: Ia2a674c5c35b5a849ce8f5eef3d34d165b3195b6 Reviewed-on: https://go-review.googlesource.com/c/go/+/593335 LUCI-TryBot-Result: Go LUCI Reviewed-by: Joseph Tsai Reviewed-by: David Chase Auto-Submit: Ian Lance Taylor Reviewed-by: Ian Lance Taylor --- src/encoding/json/encode.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/encoding/json/encode.go') diff --git a/src/encoding/json/encode.go b/src/encoding/json/encode.go index cb28feb279..7bee1a6805 100644 --- a/src/encoding/json/encode.go +++ b/src/encoding/json/encode.go @@ -141,7 +141,7 @@ import ( // are sorted and used as JSON object keys by applying the following rules, // subject to the UTF-8 coercion described for string values above: // - keys of any string type are used directly -// - [encoding.TextMarshalers] are marshaled +// - keys that implement [encoding.TextMarshaler] are marshaled // - integer keys are converted to strings // // Pointer values encode as the value pointed to. -- cgit v1.3