Fixes #32427
Change-Id: I4b863bd3836067dcc2eb3a9c3a7169656763d003
Reviewed-on: https://go-review.googlesource.com/c/go/+/180438
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Rob Pike <r@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.
+// 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
// 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
// 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