diff --git a/src/cmd/go/internal/web/file_test.go b/src/cmd/go/internal/web/file_test.go index e31ad71d4d982e..63394690453dd0 100644 --- a/src/cmd/go/internal/web/file_test.go +++ b/src/cmd/go/internal/web/file_test.go @@ -19,6 +19,8 @@ func TestGetFileURL(t *testing.T) { if err != nil { t.Fatal(err) } + defer os.Remove(f.Name()) + if _, err := f.WriteString(content); err != nil { t.Error(err) }