【发布时间】:2020-10-29 13:51:07
【问题描述】:
刚开始使用 go,卡在一个非常简单的应用程序上(来自这里 https://golang.org/doc/tutorial/call-module-code) 当我尝试编译 hello.go 时:
...
hello.go:6:5: cannot find module providing package example.com/greeting
...
环境是这样设置的(Ubuntu 20.04)
root@591c0587972e:~/proj/test/go.test# go env | grep GOPA
GOPATH="/root/go:/root/proj/test/go.test"
root@591c0587972e:~/proj/test/go.test# go version
go version go1.15.3 linux/amd64
源代码https://github.com/myxit/golang-wtf
请帮忙,设置有什么问题?
【问题讨论】: