It returns an error, if any.” The implemenation as of 1.8, however, shows: func (f *File) Close () error { if f == nil { return ErrInvalid } return f.file.
/notes.txt" ) if err!= nil { return } defer func () { cerr := f. Close () if err == nil { err = cerr } }() err = io.