解决四:
或者设置代理试试,打开你的终端并执行(Go 1.13 及以上)

go env -w GO111MODULE=on
go env -w GOPROXY=https://goproxy,direct

参考:https://blog.csdn/sphinx1122/article/details/117395530

更多推荐

【golang】安装库出错 cannot find package “github.com/xxx“ in any of