Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

go tool compile not support module-aware #43512

Closed
vela-security opened this issue Jan 5, 2021 · 1 comment
Closed

go tool compile not support module-aware #43512

vela-security opened this issue Jan 5, 2021 · 1 comment

Comments

@vela-security
Copy link

$ go version:go1.15 linux/amd64

$ go env

GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/edunx/.cache/go-build"
GOENV="/home/edunx/.config/go/env"
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOMODCACHE="/home/edunx/go/3rd/pkg/mod"
GOOS="linux"
GOPATH="/home/edunx/go/3rd"
GOROOT="/home/edunx/go"
GOSUMDB="sum.golang.org"
GOTOOLDIR="/home/edunx/go/pkg/tool/linux_amd64"

can't find import

go tool compile -I $GOPATH/pkg/mod -o kafka.o *.go
kafka.go:6:2: can't find import: "golang.org/x/time/rate

@mvdan
Copy link
Member

mvdan commented Jan 5, 2021

You should use go build, not go tool compile directly.

The Go project doesn't use the issue tracker for questions. See https://golang.org/wiki/Questions.

@mvdan mvdan closed this as completed Jan 5, 2021
@golang golang locked and limited conversation to collaborators Jan 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants