Allow imports from GOROOT

This commit is contained in:
Ayke van Laethem
2018-08-18 01:11:50 +02:00
parent 4af2bcb6a9
commit cad3e03f94
+2
View File
@@ -8,6 +8,7 @@ import (
"go/token"
"go/types"
"os"
"runtime"
"strconv"
"strings"
@@ -137,6 +138,7 @@ func (c *Compiler) Parse(mainPath string, buildTags []string) error {
GOARCH: tripleSplit[0],
GOOS: tripleSplit[2],
GOROOT: ".",
GOPATH: runtime.GOROOT(),
CgoEnabled: true,
UseAllFiles: false,
Compiler: "gc", // must be one of the recognized compilers