From 39fd87bbf19cea939fb9d3f28cfee783dfcb680d Mon Sep 17 00:00:00 2001 From: nkbai Date: Fri, 22 Sep 2017 11:28:57 +0800 Subject: [PATCH] output result always error on windows. --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 2ba2ce0..ca9ce72 100644 --- a/main.go +++ b/main.go @@ -212,7 +212,7 @@ func (cfg *Config) process() (code []byte, err error) { return nil, err } opt := &imports.Options{Comments: true, TabIndent: true, TabWidth: 8} - code, err = imports.Process("", code, opt) + code, err = imports.Process(os.TempDir(), code, opt) if err != nil { panic(fmt.Errorf("BUG: can't gofmt generated code: %v", err)) }