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

相关阅读 >>

Go - Go build 各种系统下的可执行文件

Golang服务器有优势吗

Golang实现插入排序

Golang io读取文件与判断文件是否存在的方法

通过 wasmedge 嵌入webassembly 函数扩展 Golang 应用

Go语言条件语句

聊聊dubbo-Go-proxy的replacepathfilter

Golang 之 struct能不能比较

手把手带你进行Golang环境配置

详解Golang如何对excel进行处理

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




打赏

取消

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

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

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

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

评论

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

    暂无评论...