io: close PipeReader in test

Change-Id: I33858efc00dff02432f28f1e5a94aeea261a5bad
GitHub-Last-Rev: 98861f8d6e187a03330a0947ff651826024fcad2
GitHub-Pull-Request: golang/go#66230
Reviewed-on: https://go-review.googlesource.com/c/go/+/570357
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
guoguangwu 2024-03-11 11:09:50 +00:00 committed by Gopher Robot
parent b4b9746e51
commit 80157f4cff

View File

@ -286,7 +286,7 @@ func TestWriteNil(t *testing.T) {
func TestWriteAfterWriterClose(t *testing.T) {
r, w := Pipe()
defer r.Close()
done := make(chan bool)
var writeErr error
go func() {