From: Sean Liao Date: Sun, 6 Oct 2024 10:20:50 +0000 (+0100) Subject: io/fs: document need to call File.Close X-Git-Tag: go1.24rc1~734 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=1a955f5c8ece0ab3cc282fd26395b31fb300a212;p=gostls13.git io/fs: document need to call File.Close Fixes #69723 Change-Id: Id081f68cd30abfa77a971a2370f4a0ebf330eb8d Reviewed-on: https://go-review.googlesource.com/c/go/+/618095 Reviewed-by: Alan Donovan Auto-Submit: Ian Lance Taylor LUCI-TryBot-Result: Go LUCI Commit-Queue: Ian Lance Taylor Reviewed-by: Cherry Mui --- diff --git a/src/io/fs/fs.go b/src/io/fs/fs.go index 6891d75a0e..6583bcd7b9 100644 --- a/src/io/fs/fs.go +++ b/src/io/fs/fs.go @@ -26,6 +26,7 @@ import ( // correctness. type FS interface { // Open opens the named file. + // [File.Close] must be called to release any associated resources. // // When Open returns an error, it should be of type *PathError // with the Op field set to "open", the Path field set to name,