go2draft-error-handling-overview: Double io.Closer calls #27750
Labels
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
The examples in https://go.googlesource.com/proposal/+/master/design/go2draft-error-handling-overview.md arrange for w.Close() to be called more than once. https://golang.org/pkg/io/#Closer says
The behavior of Close after the first call is undefined. Specific implementations may document their own behavior.
The text before the code, and the problem:
It's OK for the double-Close to be one of the faults with the 'before', but it would be nice if the improved 'after' version didn't also do it. The more robust version with more helpful errors would be one in between doesn't.
CC: @rsc
The text was updated successfully, but these errors were encountered: