mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
doc: clarify safety of multiple and concurent os.(*File).Close() calls
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>
This commit is contained in:
parent
49200e3f3e
commit
fc705275c3
3 changed files with 3 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue