fix: reuse rather than re-import an already imported source package

This commit is contained in:
Marc Vertes
2019-09-09 15:54:05 +02:00
committed by Traefiker Bot
parent bfa9a267be
commit 2f0279f0f5
12 changed files with 67 additions and 21 deletions

View File

@@ -1,6 +1,7 @@
package interp_test
import (
"go/build"
"go/parser"
"go/token"
"io/ioutil"
@@ -51,7 +52,7 @@ func runCheck(t *testing.T, p string) {
r, w, _ := os.Pipe()
os.Stdout = w
i := interp.New(interp.Options{})
i := interp.New(interp.Options{GoPath: build.Default.GOPATH})
i.Name = p
i.Use(interp.Symbols)
i.Use(stdlib.Symbols)