Currently, File.Close only documents that "an" error will be returned
by pending I/O operations. Update the documentation to say that error
is specifically ErrClosed.
Change-Id: Ica817c9196ad6cb570c826789d37a4ff15a5d13d
Reviewed-on: https://go-review.googlesource.com/c/go/+/371015
Trust: Austin Clements <austin@google.com>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
// Close closes the File, rendering it unusable for I/O.
// On files that support SetDeadline, any pending I/O operations will
-// be canceled and return immediately with an error.
+// be canceled and return immediately with an ErrClosed error.
// Close will return an error if it has already been called.
func (f *File) Close() error {
if err := f.checkValid("close"); err != nil {
// Close closes the File, rendering it unusable for I/O.
// On files that support SetDeadline, any pending I/O operations will
-// be canceled and return immediately with an error.
+// be canceled and return immediately with an ErrClosed error.
// Close will return an error if it has already been called.
func (f *File) Close() error {
if f == nil {