Skip to content

Commit

Permalink
doc/go1.21: document that os.DirFS implements fs.Read{File,Dir}FS
Browse files Browse the repository at this point in the history
Also add a missing </a> in the preceding section.

For #53761

Change-Id: I8e64b86b5b32067f954d58cf9adf86cb4d2eeb2b
Reviewed-on: https://go-review.googlesource.com/c/go/+/499735
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Auto-Submit: Eli Bendersky <eliben@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Eli Bendersky <eliben@google.com>
  • Loading branch information
tklauser authored and gopherbot committed Jun 1, 2023
1 parent b100e12 commit b25dff2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion doc/go1.21.html
Original file line number Diff line number Diff line change
Expand Up @@ -771,10 +771,19 @@ <h3 id="minor_library_changes">Minor changes to the library</h3>
<a href="/pkg/io/fs/#DirEntry"><code>io/fs.DirEntry</code></a>
interface returned by the
<a href="/pkg/os/#ReadDir"><code>ReadDir</code></a> function and
the <a href="/pkg/os/#File.ReadDir"><code>File.ReadDir</code>
the <a href="/pkg/os/#File.ReadDir"><code>File.ReadDir</code></a>
method now implements a <code>String</code> method that calls
<a href="/pkg/io/fs/#FormatDirEntry"><code>io/fs.FormatDirEntry</code></a>.
</p>

<p><!-- https://go.dev/issue/53761, CL 416775, CL 498015-->
The implementation of the
<a href="/pkg/io/fs/#FS"><code>io/fs.FS</code></a> interface returned by
the <a href="/pkg/os/#DirFS"><code>DirFS</code></a> function now implements
the <a href="/pkg/io/fs/#ReadFileFS"><code>io/fs.ReadFileFS</code></a> and
the <a href="/pkg/io/fs/#ReadDirFS"><code></code>ios/fs.ReadDirFS</a>
interfaces.
</p>
</dd>
</dl><!-- os -->

Expand Down

0 comments on commit b25dff2

Please sign in to comment.