Go build but module-aware mode

277 views
Skip to first unread message

Richiise Nugraha

unread,
Jul 20, 2022, 10:04:48 AM7/20/22
to golang-nuts
Hi, is there any way to build source from given path@version just like `go run` and `go mod`? 
What i got:
> go build -o main_x github.com/xxxx/xxxx@latest
package github.com/xxxx/xxxx@latest: can only use path@version syntax with 'go get' and 'go install' in module-aware mode

(and maybe putting `GOARCH` and/or `GOOS`)

Thanks

Amnon

unread,
Jul 20, 2022, 10:09:34 AM7/20/22
to golang-nuts
I can't. My problem is that I can't access  github.com/xxxx/xxxx.
Either it does not exist.
Or user xxxx has made the repo private on Github.


Screenshot 2022-07-20 at 15.07.31.png
Reply all
Reply to author
Forward
0 new messages