1. fix parsing go.mod module declares its path as “x” but was required as “y”
I think the problem comes from the fact that the
go.mod
of your cloned version oforiginal-project
still saysmodule github.com/y/original-project
. You should use thego.mod
replace
directive. It is meant for cases like yours exactly.
a question about fork
2. go:embed requires go1.16 or later (-lang was set to go1.14; check go.mod)
go mod中声明的go版本是go1.14所以有以上报错
3. pulsar分享
// TODO
4. 导致x509: certificate signed by unknown authority问题的原因
go get 时会先进行 1 次 HTTPS GET 以获取 go-import
数据,而 HTTPS 网站的证书不受信任导致的(可能是没有根证书或中间证书来验证 HTTPS 网站的证书是可信的)。
解决方案:
可以再go get的时候添加 -insecure
go get -insecure xxxx
这个可以解决单个go get的问题,但是针对类似go mod
的命令就无能为力, 所以还有另外一种办法:将证书文件 导入到相应目录,并执行证书更新
// 证书导入
cp **** /etc/pki/ca-trust/source/anchors/
// 执行更新
update-ca-trust
5. logur
6. missing go.sum entry for module providing package XXXX
fix by run go mod download
or go mod tidy
有疑问加站长微信联系(非本文作者)