1
0
mirror of https://github.com/golang/go synced 2024-11-18 11:14:39 -07:00

cmd/guru: Close before Remove a file

Change-Id: Ia12ff7a0f6898f8d140565d255793904ce8585c4
Reviewed-on: https://go-review.googlesource.com/38754
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
This commit is contained in:
Yasuhiro Matsumoto 2017-03-28 17:49:10 +09:00 committed by Ian Lance Taylor
parent 963fe939f1
commit 474a26d4c8

View File

@ -269,8 +269,8 @@ func TestGuru(t *testing.T) {
t.Errorf("Create(%s) failed: %s", got, err)
continue
}
defer gotfh.Close()
defer os.Remove(got)
defer gotfh.Close()
// Run the guru on each query, redirecting its output
// and error (if any) to the foo.got file.