1. 首页
  2. 开发

当 go proxy 想跳过某些域名时

If your Go version >= 1.13, the GOPRIVATE environment variable controls which modules the go command considers to be private (not available publicly) and should therefore not use the proxy or checksum database. For example:

go env -w GOPROXY=https://goproxy.io,direct
# Set environment variable allow bypassing the proxy for selected modules
go env -w GOPRIVATE=*.corp.example.com
收藏

暂无评论

登录后可以进行评论。没有账号?马上注册