]> Cypherpunks repositories - gostls13.git/commitdiff
doc: add release notes for changes to encoding packages
authorRobert Griesemer <gri@golang.org>
Tue, 5 Dec 2023 21:40:45 +0000 (13:40 -0800)
committerGopher Robot <gobot@golang.org>
Tue, 5 Dec 2023 23:55:18 +0000 (23:55 +0000)
For #53693.

Change-Id: I360f5cb9caf5fa77267a100eebcc282955677abe
Reviewed-on: https://go-review.googlesource.com/c/go/+/547755
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Joseph Tsai <joetsai@digital-static.net>
TryBot-Bypass: Robert Griesemer <gri@google.com>

doc/go1.22.html

index e7f7e488895523cc86a241b84571c1ec4ce21327..12203742bd95ce4a630fd430aa5fd30d447d0f69 100644 (file)
@@ -324,16 +324,21 @@ Do not send CLs removing the interior tags from such phrases.
 
 <dl id="encoding"><dt><a href="/pkg/encoding/">encoding</a></dt>
   <dd>
-    <p><!-- https://go.dev/issue/53693 -->
-      TODO: <a href="https://go.dev/issue/53693">https://go.dev/issue/53693</a>: provide append-like variants
-    </p>
-
-    <p><!-- CL 504884 -->
-      TODO: <a href="https://go.dev/cl/504884">https://go.dev/cl/504884</a>: encoding: add AppendEncode and AppendDecode; modified api/next/53693.txt
-    </p>
-
-    <p><!-- CL 505236 -->
-      TODO: <a href="https://go.dev/cl/505236">https://go.dev/cl/505236</a>: encoding: reject negative runes in Encoding.WithPadding; Providing a negative rune to Encoding.WithPadding other than NoPadding made no semantic sense, and will now panic.
+    <p><!-- https://go.dev/issue/53693, https://go.dev/cl/504884 -->
+      The new methods <code>AppendEncode</code> and <code>AppendDecode</code> added to
+      each of the <code>Encoding</code> types in the packages
+      <a href="/pkg/encoding/base32"><code>encoding/base32</code></a>,
+      <a href="/pkg/encoding/base64"><code>encoding/base64</code></a>, and
+      <a href="/pkg/encoding/hex"><code>encoding/hex</code></a>
+      simplify encoding and decoding from and to byte slices by taking care of byte slice buffer management.
+    </p>
+
+    <p><!-- https://go.dev/cl/505236 -->
+      The methods
+      <a href="/pkg/encoding/base32#Encoding.WithPadding"><code>base32.Encoding.WithPadding</code></a> and
+      <a href="/pkg/encoding/base64#Encoding.WithPadding"><code>base64.Encoding.WithPadding</code></a>
+      now panic if the <code>padding</code> argument is a negative value other than
+      <code>NoPadding</code>.
     </p>
   </dd>
 </dl><!-- encoding -->