Allow imports from GOROOT
Этот коммит содержится в:
родитель
4af2bcb6a9
коммит
cad3e03f94
1 изменённых файлов: 2 добавлений и 0 удалений
|
@ -8,6 +8,7 @@ import (
|
||||||
"go/token"
|
"go/token"
|
||||||
"go/types"
|
"go/types"
|
||||||
"os"
|
"os"
|
||||||
|
"runtime"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
|
@ -137,6 +138,7 @@ func (c *Compiler) Parse(mainPath string, buildTags []string) error {
|
||||||
GOARCH: tripleSplit[0],
|
GOARCH: tripleSplit[0],
|
||||||
GOOS: tripleSplit[2],
|
GOOS: tripleSplit[2],
|
||||||
GOROOT: ".",
|
GOROOT: ".",
|
||||||
|
GOPATH: runtime.GOROOT(),
|
||||||
CgoEnabled: true,
|
CgoEnabled: true,
|
||||||
UseAllFiles: false,
|
UseAllFiles: false,
|
||||||
Compiler: "gc", // must be one of the recognized compilers
|
Compiler: "gc", // must be one of the recognized compilers
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче