新人求问:Linux下GO环境变量PATH设置问题。

Suppermanchaoren · · 2021 次点击
收到大佬指示!!! 收下我的膝盖 :bowtie:
#6
更多评论
```go GO111MODULE="off" GOARCH="amd64" GOBIN="" GOCACHE="/home/liu/.cache/go-build" GOENV="/home/liu/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/liu/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/liu/go" GOPRIVATE="" GOPROXY="https://mirrors.aliyun.com/goproxy/" GOROOT="/usr/local/go" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.20.3" GCCGO="gccgo" GOAMD64="v1" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="" GOWORK="" CGO_CFLAGS="-O2 -g" CGO_CPPFLAGS="" CGO_CXXFLAGS="-O2 -g" CGO_FFLAGS="-O2 -g" CGO_LDFLAGS="-O2 -g" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build3663553553=/tmp/go-build -gno-record-gcc-switches" ```
#1
导入路径不存在`/gocode/...`的形式。 你想表达的意思应该是 ```go import "./gocode/..." ``` 或者 ```go import "../gocode/..." ```
#2