douyou2732 2019-02-12 12:35
浏览 1106
已采纳

如何导入本地模块golang? [重复]

This question already has an answer here:

How can I import locally build go module?

Importing without version gives:

go: errors parsing go.mod:
.../go.mod:4: usage: require module/path v1.2.3

In the list of modules via command:

go list -m all

I see it goes without version.

</div>
  • 写回答

1条回答 默认 最新

  • douzong5057 2019-02-12 12:47
    关注

    The solution is to use replace feature:

    replace bitbucket.org/xxx/yyy v0.0.0-fff-zzz => ../yyy/
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 DIFY API Endpoint 问题。
  • ¥20 sub地址DHCP问题
  • ¥15 delta降尺度计算的一些细节,有偿
  • ¥15 Arduino红外遥控代码有问题
  • ¥15 数值计算离散正交多项式
  • ¥30 数值计算均差系数编程
  • ¥15 redis-full-check比较 两个集群的数据出错
  • ¥15 Matlab编程问题
  • ¥15 训练的多模态特征融合模型准确度很低怎么办
  • ¥15 kylin启动报错log4j类冲突