Skip to content

Commit dcb27e8

Browse files
ianlancetaylorgopherbot
authored andcommitted
doc/go1.21: mention regexp.MarshalText and UnmarshalText
For #46159 Change-Id: Ia9cc0827a89d362532d1a662b791de8eebbfb2fe Reviewed-on: https://go-review.googlesource.com/c/go/+/498756 Reviewed-by: Ian Lance Taylor <[email protected]> Reviewed-by: Eli Bendersky <[email protected]> Auto-Submit: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> Run-TryBot: Ian Lance Taylor <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 260a9b0 commit dcb27e8

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

doc/go1.21.html

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -667,12 +667,16 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
667667

668668
<dl id="regexp"><dt><a href="/pkg/regexp/">regexp</a></dt>
669669
<dd>
670-
<p><!-- https://go.dev/issue/46159 -->
671-
TODO: <a href="https://go.dev/issue/46159">https://go.dev/issue/46159</a>: support encoding.TextMarshaler
672-
</p>
673-
674-
<p><!-- CL 479401 -->
675-
TODO: <a href="https://go.dev/cl/479401">https://go.dev/cl/479401</a>: regexp: add Regexp.TextMarshaler/TextUnmarshaler; modified api/next/46159.txt
670+
<p><!-- https://go.dev/issue/46159, CL 479401 -->
671+
<a href="/pkg/regexp#Regexp"><code>Regexp</code></a> now defines
672+
<a href="/pkg/regexp#Regexp.MarshalText"><code>MarshalText</code></a>
673+
and <a href="/pkg/regexp#Regexp.UnmarshalText"><code>UnmarshalText</code></a>
674+
methods. These implement
675+
<a href="/pkg/encoding#TextMarshaler"><code>encoding.TextMarshaler</code></a>
676+
and
677+
<a href="/pkg/encoding#TextUnmarshaler"><code>encoding.TextUnmarshaler</code></a>
678+
and will be used by packages such as
679+
<a href="/pkg/encoding/json">encoding/json</a>.
676680
</p>
677681
</dd>
678682
</dl><!-- regexp -->

0 commit comments

Comments
 (0)