From: Ian Lance Taylor
Date: Fri, 26 May 2023 21:25:45 +0000 (-0700)
Subject: doc/go1.21: mention changes to the reflect package
X-Git-Tag: go1.21rc1~201
X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c2bb350d80fa6116094f819f48d83f1f34993295;p=gostls13.git
doc/go1.21: mention changes to the reflect package
Added Value.Clear, deprecated SliceHeader and StringHeader.
For #55002
For #56906
Change-Id: Ib7497aff830d56fad90c31ec28596e71a448e9ce
Reviewed-on: https://go-review.googlesource.com/c/go/+/498757
Reviewed-by: Ian Lance Taylor
Auto-Submit: Ian Lance Taylor
Run-TryBot: Ian Lance Taylor
Reviewed-by: Eli Bendersky
Run-TryBot: Ian Lance Taylor
TryBot-Result: Gopher Robot
---
diff --git a/doc/go1.21.html b/doc/go1.21.html
index b959cdb116..88200bf33e 100644
--- a/doc/go1.21.html
+++ b/doc/go1.21.html
@@ -652,15 +652,21 @@ Do not send CLs removing the interior tags from such phrases.
- TODO: https://go.dev/issue/55002: add Value.Clear
-
-
-
- TODO: https://go.dev/issue/56906: deprecate SliceHeader and StringHeader
-
-
-
- TODO: https://go.dev/cl/452762: reflect: deprecate SliceHeader and StringHeader; modified api/next/56906.txt
+ The new Value
+ method Value.Clear
+ clears the contents of a map or zeros the contents of a slice.
+ This corresponds to the new clear
built-in
+ added to the language.
+
+
+
+ The SliceHeader
+ and StringHeader
+ types are now deprecated. In new code
+ prefer unsafe.Slice
,
+ unsafe.SliceData
,
+ unsafe.String
,
+ or unsafe.StringData
.