diff --git a/src/os/file_plan9.go b/src/os/file_plan9.go index feca8630bea..3a0b774aa2d 100644 --- a/src/os/file_plan9.go +++ b/src/os/file_plan9.go @@ -133,7 +133,8 @@ func openFileNolog(name string, flag int, perm FileMode) (*File, error) { } // Close closes the File, rendering it unusable for I/O. -// It returns an error, if any. +// On files that support SetDeadline, any pending I/O operations will +// be canceled and return immediately with an error. 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 e0b8119d968..4f80553a18f 100644 --- a/src/os/file_unix.go +++ b/src/os/file_unix.go @@ -217,7 +217,8 @@ func openFileNolog(name string, flag int, perm FileMode) (*File, error) { } // Close closes the File, rendering it unusable for I/O. -// It returns an error, if any. +// On files that support SetDeadline, any pending I/O operations will +// be canceled and return immediately with an error. 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 a17c6e2ac33..8901eadd256 100644 --- a/src/os/file_windows.go +++ b/src/os/file_windows.go @@ -171,7 +171,8 @@ func openFileNolog(name string, flag int, perm FileMode) (*File, error) { } // Close closes the File, rendering it unusable for I/O. -// It returns an error, if any. +// On files that support SetDeadline, any pending I/O operations will +// be canceled and return immediately with an error. func (file *File) Close() error { if file == nil { return ErrInvalid