golang 利用github自定义module 踩坑系列 类似于「springboot starter 一毛一样」

背景:

    本人java出身,转行golang,有点类似于springboot starter 。当然好处就不多介绍了,你懂得

目标:

     自定义module,开源公共代码库。

工程结构:

          

          

          默认创建golib-config-center-client项目之后的样子

  遇到的问题:

          

         module declares its path as: 模块将其路径声明为:
         but was required as:但被要求:

扫描二维码关注公众号,回复: 11055078 查看本文章

  百度各种解决办法(依然不好使):

         1.使用replace 替代 这是一种

         2.什么设置环境变量

         3.什么ideal工具问题

   解决方法:

      各种阅读资料、排查、发现问题出在go.mod文件中

       

       请注意module 对应的名称是github的地址,而不是项目名称

小广告系列:

    本人热衷于技术,希望提供些许轮子,提升效和提质。

    仓库地址:https://github.com/codefocus-club/ 

   

         

发布了28 篇原创文章 · 获赞 20 · 访问量 1万+

猜你喜欢

转载自blog.csdn.net/u013045746/article/details/105474515