go verify 模块失败(go sumsdb 是如何工作的?)

go verify module failed (how does go sumsdb work?)

我在 go build 上遇到了这个错误:

go: github.com/frankban/quicktest@v1.14.2: verifying module: github.com/frankban/quicktest@v1.14.2: Get "https://sum.golang.org/lookup/github.com/frankban/quicktest@v1.14.2": Not Found

我的问题是,为什么在 sum db 中找不到 frankban/quicktest?事实上,这不是导致此错误的唯一包,上次我尝试编译同一个项目(大约一个小时前)时,错误出现在 golang.org/x/xerrors.

此外,任何人都可以解释(或指出一些 documents/articles/blogs)go 模块系统的“sums db”是如何工作的。如果有人遇到这样的错误,你会非常沮丧,因为你似乎无能为力?

完整日志:

$ go get -u
go: downloading github.com/tealeg/xlsx v1.0.5
go: downloading github.com/shabbyrobe/xmlwriter v0.0.0-20220218224045-defe0ad214f6
go: downloading github.com/frankban/quicktest v1.14.2
go: downloading golang.org/x/text v0.3.3
go: downloading github.com/google/btree v1.0.1
go: downloading github.com/kr/pretty v0.3.0
go: downloading golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543
go: downloading github.com/kr/text v0.2.0
go: github.com/frankban/quicktest@v1.14.2: verifying module: github.com/frankban/quicktest@v1.14.2: Get "https://sum.golang.org/lookup/github.com/frankban/quicktest@v1.14.2": Not Found
go: github.com/google/btree@v1.0.1: verifying module: github.com/google/btree@v1.0.1: Get "https://sum.golang.org/lookup/github.com/google/btree@v1.0.1": Not Found
go: github.com/kr/pretty@v0.3.0: verifying module: github.com/kr/pretty@v0.3.0: Get "https://sum.golang.org/lookup/github.com/kr/pretty@v0.3.0": Not Found
go: github.com/kr/text@v0.2.0: verifying module: github.com/kr/text@v0.2.0: Get "https://sum.golang.org/lookup/github.com/kr/text@v0.2.0": Not Found
go: github.com/shabbyrobe/xmlwriter@v0.0.0-20220218224045-defe0ad214f6: verifying module: github.com/shabbyrobe/xmlwriter@v0.0.0-20220218224045-defe0ad214f6: Get "https://sum.golang.org/lookup/github.com/shabbyrobe/xmlwriter@v0.0.0-20220218224045-defe0ad214f6": Not Found

sum.golang.org 服务器需要一些时间来更新哈希和。现在再试一次。对我来说一切正常:

$ GO111MODULE=on go get github.com/shabbyrobe/xmlwriter@v0.0.0-20220218224045-defe0ad214f6
go: downloading github.com/shabbyrobe/xmlwriter v0.0.0-20220218224045-defe0ad214f6
go: downloading golang.org/x/text v0.3.2
$ curl https://sum.golang.org/lookup/github.com/shabbyrobe/xmlwriter@v0.0.0-20220218224045-defe0ad214f6
9249991
github.com/shabbyrobe/xmlwriter v0.0.0-20220218224045-defe0ad214f6 h1:ri617veNyNwEMXywzcLmU//YIVSFdJvdk39lNsFB/Ro=
github.com/shabbyrobe/xmlwriter v0.0.0-20220218224045-defe0ad214f6/go.mod h1:tKYSeHyJGYz7eoZMlzrRDQSfdYPYt0UduMr8b97Mmaw=

go.sum database tree
9690070
OufFSNsOUYeDJ2VPyrxBAe7/d47lQYkE03JZL2ltaI8=

— sum.golang.org Az3grkvrWUkW3Rvnl5QL72oZpiY5ifJhab3/evZCb0hmRkEtGRE/tCMyFDXftZWFi2SF71EuHAxJMTgLd1laHabOzAE=