diff --git a/src/os/file_plan9.go b/src/os/file_plan9.go index 14091873cf96c8faf80c617a0b9b8c1679634b94..e0a3826a34cb7b4f4a330b3a0f1230e250c7d1a4 100644 --- a/src/os/file_plan9.go +++ b/src/os/file_plan9.go @@ -136,6 +136,7 @@ func openFileNolog(name string, flag int, perm FileMode) (*File, error) { // 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. +// Close will return an error if it has already been called. func (f *File) Close() error { if err := f.checkValid("close"); err != nil { return err diff --git a/src/os/file_unix.go b/src/os/file_unix.go index 89c05b26572afd9d75d51e1591042aa45ad40416..754e859645388ad401b2ec8695ef30a01ca4bfc6 100644 --- a/src/os/file_unix.go +++ b/src/os/file_unix.go @@ -225,6 +225,7 @@ func openFileNolog(name string, flag int, perm FileMode) (*File, error) { // 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. +// Close will return an error if it has already been called. func (f *File) Close() error { if f == nil { return ErrInvalid diff --git a/src/os/file_windows.go b/src/os/file_windows.go index 08444d728f6740f689d1013f9aee64137c5b3eae..1e78f4e8670012e6dff3c42b5f2025a9b770b21d 100644 --- a/src/os/file_windows.go +++ b/src/os/file_windows.go @@ -178,6 +178,7 @@ func openFileNolog(name string, flag int, perm FileMode) (*File, error) { // 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. +// Close will return an error if it has already been called. func (file *File) Close() error { if file == nil { return ErrInvalid