What version of Go are you using (go version)?
go1.9.2
What did you do?
https://play.golang.org/p/mxGWipaSUGN
package main
import (
"encoding/hex"
"os"
)
func main() {
d := hex.Dumper(os.Stdout)
d.Write([]byte(`gopher`))
d.Close()
d.Close()
}
What did you expect to see?
00000000 67 6f 70 68 65 72 |gopher|
What did you see instead?
00000000 67 6f 70 68 65 72 |gopher|
gopher|
|
Calling Close twice is obviously a mistake, but it seems we might as well do something more intelligent than what is currently happening. I doubt anyone is relying the current behaviour.
Mailing CL.