]> Cypherpunks.ru repositories - gostls13.git/commitdiff
doc/go1.21: mention os package changes
authorIan Lance Taylor <iant@golang.org>
Fri, 26 May 2023 23:03:32 +0000 (16:03 -0700)
committerGopher Robot <gobot@golang.org>
Fri, 26 May 2023 23:40:46 +0000 (23:40 +0000)
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>

doc/go1.21.html

index 88200bf33e2f227c04cd9ad75f222380ba84772c..3758d282c3c83c113105a33de38b6a079cb1d18d 100644 (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 -->