美文网首页
2021-04-19

2021-04-19

作者: lucasgao | 来源:发表于2021-04-19 21:44 被阅读0次

    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

    相关文章

      网友评论

          本文标题:2021-04-19

          本文链接:https://www.haomeiwen.com/subject/tlvwlltx.html