File tree 1 file changed +15
-9
lines changed 1 file changed +15
-9
lines changed Original file line number Diff line number Diff line change @@ -652,15 +652,21 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
652
652
</ p >
653
653
654
654
< p > <!-- https://go.dev/issue/55002 -->
655
- TODO: < a href ="https://go.dev/issue/55002 "> https://go.dev/issue/55002</ a > : add Value.Clear
656
- </ p >
657
-
658
- < p > <!-- https://go.dev/issue/56906 -->
659
- TODO: < a href ="https://go.dev/issue/56906 "> https://go.dev/issue/56906</ a > : deprecate SliceHeader and StringHeader
660
- </ p >
661
-
662
- < p > <!-- CL 452762 -->
663
- TODO: < a href ="https://go.dev/cl/452762 "> https://go.dev/cl/452762</ a > : reflect: deprecate SliceHeader and StringHeader; modified api/next/56906.txt
655
+ The new < a href ="/pkg/reflect/#Value "> < code > Value</ code > </ a >
656
+ method < a href ="/pkg/reflect/#Value.Clear "> < code > Value.Clear</ code > </ a >
657
+ clears the contents of a map or zeros the contents of a slice.
658
+ This corresponds to the new < code > clear</ code > built-in
659
+ < a href ="#language "> added to the language</ a > .
660
+ </ p >
661
+
662
+ < p > <!-- https://go.dev/issue/56906, CL 452762 -->
663
+ The < a href ="/pkg/reflect/#SliceHeader "> < code > SliceHeader</ code > </ a >
664
+ and < a href ="/pkg/reflect/#StringHeader "> < code > StringHeader</ code > </ a >
665
+ types are now deprecated. In new code
666
+ prefer < a href ="/pkg/unsafe/#Slice "> < code > unsafe.Slice</ code > </ a > ,
667
+ < a href ="/pkg/unsafe/#SliceData "> < code > unsafe.SliceData</ code > </ a > ,
668
+ < a href ="/pkg/unsafe/#String "> < code > unsafe.String</ code > </ a > ,
669
+ or < a href ="/pkg/unsafe/#StringData "> < code > unsafe.StringData</ code > </ a > .
664
670
</ p >
665
671
</ dd >
666
672
</ dl > <!-- reflect -->
You can’t perform that action at this time.
0 commit comments