运行go mod download时会显示警告(警告:模式“全部”匹配没有模块依赖项),并且我的 go.mod 文件中的任何模块都不会下载到本地缓存。
我在谷歌上花了最后一个小时试图找到类似的错误,但一直坚持唯一的结果是破坏 CI 构建日志。
我的 go.mod 文件如下:
module github.com/j4ng5y/scraper-api
go 1.12
require (
github.com/PuerkitoBio/goquery v1.5.0 // indirect
github.com/antchfx/htmlquery v1.0.0 // indirect
github.com/antchfx/xmlquery v1.0.0 // indirect
github.com/antchfx/xpath v0.0.0-20190319080838-ce1d48779e67 // indirect
github.com/go-yaml/yaml v2.1.0+incompatible
github.com/gobwas/glob v0.2.3 // indirect
github.com/gocolly/colly v1.2.0 // indirect
github.com/gorilla/mux v1.7.1
github.com/kennygrant/sanitize v1.2.4 // indirect
github.com/saintfish/chardet v0.0.0-20120816061221-3af4cd4741ca // indirect
github.com/temoto/robotstxt v0.0.0-20180810133444-97ee4a9ee6ea // indirect
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3 // indirect
google.golang.org/appengine v1.5.0 // indirect
)
我希望go mod download将所有模块拉到本地缓存,但我收到警告并且没有下载任何内容。