Couldn't find tour files: could not find go-tour content; check $GOROOT and $GOPATH
go get golang.org/x/tour
备注:go 代理
在 go 官方文档上,安装 tour 项目。安装完以后,tour 会被安装到 GOPATH bin 文件夹下,运行的时候报错。
在网上搜索发现 tour 的 main 函数在 local.go 文件中。
我也不太了解这个项目是怎么找路径的,解决方法是在 tour 源码根目录下运行 tour ,就不报错了
go get 安装 tour 下载到了这里 /Users/hg26972/go/pkg/mod/golang.org/x/[email protected],可以把它拷到其他路径的。
然后就可以用浏览器查看这个文档了