doc/go1.21: mention os package changes

Also mention WTF-8 support in the syscall package.

For #32558
For #58977
For #59971

Change-Id: Id1627889b5e498add498748d9bfc69fb58030b35
Reviewed-on: https://go-review.googlesource.com/c/go/+/498600
Reviewed-by: Eli Bendersky <eliben@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Run-TryBot: Ian Lance Taylor <iant@google.com>
This commit is contained in:
Ian Lance Taylor 2023-05-26 16:03:32 -07:00 committed by Gopher Robot
parent c2bb350d80
commit 6e248b8ff2

View File

@ -608,6 +608,12 @@ Do not send CLs removing the interior tags from such phrases.
<dl id="os"><dt><a href="/pkg/os/">os</a></dt>
<dd>
<p><!-- https://go.dev/issue/32558, CL 219638 -->
Programs may now pass an empty <code>time.Time</code> value to
the <a href="/pkg/os/#Chtimes"><code>Chtimes</code></a> function
to leave either the access time or the modification time unchanged.
</p>
<p><!-- CL 480135 -->
On Windows the
<a href="/pkg/os#File.Chdir"><code>File.Chdir></a> method
@ -615,31 +621,21 @@ Do not send CLs removing the interior tags from such phrases.
always returning an error.
</p>
<p><!-- https://go.dev/issue/32558 -->
TODO: <a href="https://go.dev/issue/32558">https://go.dev/issue/32558</a>: allow Chtimes with time.Time{} to avoid setting time
</p>
<p><!-- CL 219638 -->
TODO: <a href="https://go.dev/cl/219638">https://go.dev/cl/219638</a>: os: make Chtimes accept empty time values to skip file time modification
</p>
<p><!-- CL 477215 -->
TODO: <a href="https://go.dev/cl/477215">https://go.dev/cl/477215</a>: os: avoid creating a new file in Truncate on Windows; os.Truncate on Windows no longer now fails if the file does not exist, consistent with other platforms
On Windows calling
<a href="/pkg/os/#Truncate"><code>Truncate</code></a> on a
non-existent file used to create an empty file. It now returns
an error indicating that the file does not exist.
</p>
<p><!-- CL 493036 -->
TODO: <a href="https://go.dev/cl/493036">https://go.dev/cl/493036</a>: os, syscall: support ill-formed UTF-16 strings on Windows
On Windows the os package now supports working with files whose
names, stored as UTF-16, can't be represented as valid UTF-8.
</p>
</dd>
</dl><!-- os -->
<dl id="os/user"><dt><a href="/pkg/os/user/">os/user</a></dt>
<dd>
<p><!-- CL 459455 -->
TODO: <a href="https://go.dev/cl/459455">https://go.dev/cl/459455</a>: os/user: lookup Linux users and groups via systemd userdb
</p>
</dd>
</dl><!-- os/user -->
<!-- CL 459455 reverted -->
<dl id="reflect"><dt><a href="/pkg/reflect/">reflect</a></dt>
<dd>
@ -792,6 +788,17 @@ Do not send CLs removing the interior tags from such phrases.
has a new field <code>Jail</code> that may be used to put the
newly created process in a jailed environment.
</p>
<p><!-- CL 493036 -->
On Windows the syscall package now supports working with files whose
names, stored as UTF-16, can't be represented as valid UTF-8.
The <a href="/pkg/syscall#UTF16ToString"><code>UTF16ToString</code></a>
and <a href="/pkg/syscall#UTF16FromString"><code>UTF16FromString</code></a>
functions now convert between UTF-16 data and
<a href=http://simonsapin.github.io/wtf-8/"">WTF-8</a> strings.
This is backward compatible as WTF-8 is a superset of the UTF-8
format that was used in earlier releases.
</p>
</dd>
</dl><!-- syscall -->