2021-04-19


本文摘自网络,作者,侵删。

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 of original-project still says module github.com/y/original-project. You should use the go.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

参考链接https://logur.dev/logur

6. missing go.sum entry for module providing package XXXX

fix by run go mod download or go mod tidy


本文来自:简书

感谢作者:lucasgao

查看原文:2021-04-19

相关阅读 >>

聊聊dubbo-Go-proxy的apifilter

Golang 如何处理大数据

Golang base64 斜杠 等号 问题

希尔排序

在使用database/sql时应避免掉进这11个坑 !(Go 数据库)

聊聊dapr的pipeline

详解windows10+Golang+grpc环境搭建

详解Go内联优化

使用gin封装一个web脚手架(八):限流器

json分级解析及数字解析实践

更多相关阅读请进入《Go》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...