1
0
mirror of https://github.com/golang/go synced 2024-11-23 22:30:05 -07:00

cmd/fix: cleanup directories created during typecheck

Executing

$ go tool dist test -run=^go_test:cmd/fix$

leaves a number of directories (fix_cgo_typecheck*) in TMPDIR.

Change-Id: Ia5bdc2f7d884333771d50365063faf514ebf6eae
Reviewed-on: https://go-review.googlesource.com/90795
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
This commit is contained in:
Mohit Agarwal 2018-01-30 18:28:50 +05:30 committed by Ian Lance Taylor
parent 32a08d09b8
commit 926f27873f

View File

@ -166,7 +166,7 @@ func typecheck(cfg *TypeConfig, f *ast.File) (typeof map[interface{}]string, ass
if err != nil {
return err
}
defer os.Remove(dir)
defer os.RemoveAll(dir)
err = ioutil.WriteFile(filepath.Join(dir, "in.go"), txt, 0600)
if err != nil {
return err