用`gopm`下载包时,已经下载到 `GOPATH/src/gopkg.in`下了,我的项目是用` go.mod` 的,于是我顺便把
包复制到 `GOPATH/pkg/mod/gopkg.in`下,两个地方都有了,但在项目中`import`还是报错:
~~~go
[Running] go run "c:\go_work\main.go"
go: finding gopkg.in/gomail.v2 latest
go: downloading gopkg.in/gomail.v2 v2.0.0-20160411212932-81ebce5c23df
verifying gopkg.in/gomail.v2@v2.0.0-20160411212932-81ebce5c23df: gopkg.in/gomail.v2@v2.0.0-20160411212932-81ebce5c23df: Get https://sum.golang.org/lookup/gopkg.in/gomail.v2@v2.0.0-20160411212932-81ebce5c23df: dial tcp 172.217.24.17:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
~~~
有疑问加站长微信联系(非本文作者)