Couldn't find tour files: could not find go-tour content; check $GOROOT and $GOPATH

go get golang.org/x/tour

备注:go 代理

https://goproxy.cn/

https://goproxy.io/

https://search.gocenter.io/

在 go 官方文档上,安装 tour 项目。安装完以后,tour 会被安装到 GOPATH bin 文件夹下,运行的时候报错。

在网上搜索发现 tour 的 main 函数在 local.go 文件中。

我也不太了解这个项目是怎么找路径的,解决方法是在 tour 源码根目录下运行 tour ,就不报错了

golang tour Couldn‘t find tour files

golang tour Couldn‘t find tour files

go get 安装 tour 下载到了这里 /Users/hg26972/go/pkg/mod/golang.org/x/[email protected],可以把它拷到其他路径的。

然后就可以用浏览器查看这个文档了

golang tour Couldn‘t find tour files

相关文章:

  • 2021-10-16
  • 2021-05-28
  • 2021-09-14
  • 2021-12-30
  • 2021-07-24
  • 2021-06-15
  • 2021-08-29
  • 2021-08-18
猜你喜欢
  • 2021-10-15
  • 2021-09-25
  • 2022-12-23
  • 2021-12-12
  • 2021-07-10
  • 2021-07-01
  • 2021-09-21
相关资源
相似解决方案