配置文件

GO111MODULE=on 设置为on时,go命令行会使用modules,而一点也不会去GOPATH目录下查找。但自定义包在 $GOPATH/github.com/winyh/strrev。就会出现 can not found github.com/winyh/strrev 

解决办法:

将GO111MODULE=auto 设置成auto

 

在使用模块的时候,GOPATH 是无意义的,不过它还是会把下载的依赖储存在 $GOPATH/pkg/mod 中,也会把 go install 的结果放在 $GOPATH/bin 中

 

相关文章:

  • 2021-07-15
  • 2021-08-01
  • 2022-12-23
  • 2021-12-18
  • 2021-08-25
  • 2021-08-29
  • 2022-12-23
  • 2022-01-30
猜你喜欢
  • 2022-12-23
  • 2021-04-06
  • 2022-12-23
  • 2021-07-27
  • 2021-09-09
  • 2022-12-23
  • 2021-12-16
相关资源
相似解决方案