zoukankan      html  css  js  c++  java
  • go mod module declares its path as: gtihub.com/xxx-xx but was required as:xx-xx

    go mod的坑

    使用go-mod 引入某个包出错例子为

    go: github.com/beego/bee imports
            github.com/beego/bee/cmd imports
            github.com/beego/bee/cmd/commands/dlv imports
            github.com/derekparker/delve/service: github.com/derekparker/delve@v1.3.2: parsing go.mod:
            module declares its path as: github.com/go-delve/delve
                    but was required as: github.com/derekparker/delve
    

    module declares its path as: github.com/go-delve/delve
    but was required as: github.com/derekparker/delve

    这句话的意思是

    模块将其路径声明为:
    但被要求:

    module declares its path as:
    but was required as:
    解决办法

    在你当前的项目下的

    go.mod

    文件中
    加入

    replace github.com/go-delve/delve => github.com/derekparker/delve v1.3.2 // indirect

    格式为:

    replace module declares its path as:(后边那部分) => but was required as:(后边那部分)

  • 相关阅读:
    Java——GUI
    linux变量
    shell脚本
    linux查找文件命令
    composer的安装
    restful的nginx配置方法
    api调用安全
    PHP设置Cookie的HTTPONLY属性
    php的异常处理
    php错误报告
  • 原文地址:https://www.cnblogs.com/liuqun/p/12655145.html
Copyright © 2011-2022 走看看