From 42f2286b630db8d5263d159d245c7015a3844976 Mon Sep 17 00:00:00 2001 From: damnever Date: Sat, 13 May 2017 18:43:37 +0800 Subject: [PATCH] Fix testcase --- parser/parser_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/parser/parser_test.go b/parser/parser_test.go index e14221e..e6835e6 100644 --- a/parser/parser_test.go +++ b/parser/parser_test.go @@ -42,7 +42,7 @@ func TestParseFromMultipleGopath(t *testing.T) { } gopath := gopaths[len(gopaths)-1] dir := filepath.Join(gopath, "src", "foo") - defer must(t, os.RemoveAll(dir)) + defer func() { must(t, os.RemoveAll(dir)) }() must(t, os.MkdirAll(dir, 0755)) must(t, ioutil.WriteFile(filepath.Join(dir, "main.go"), []byte(fakeCode), 0644))