dongxiusuo9881 2019-07-16 23:11
浏览 137

如何使golang.org中的模块与semver标签一起出现在我的go.mod中?

In my go.mod file. I wanna change versioning about modules from golang.org.

they have commit date and hash after version.

I'm using go mod, So I have go.mod file in my workspace. My go.mod is as follow.

module myproject

go 1.12.6

require (
    github.com/lib/pq v1.1.1
    golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4
    golang.org/x/image v0.0.0-20190523035834-f03afa92d3ff
)

like this.

golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4 -> golang.org/x/crypto v0.0.0

How to change it?

I think they don't have major versioning officialy. as a result, I wanna simplify my go.mod file

  • 写回答

1条回答 默认 最新

  • dongmi4720 2019-07-30 19:13
    关注

    The versioning for a Go module is determined by the author of that module, not the consumer.

    (You can use a replace directive to remap versions arbitrarily, but then nobody could use your module without doing that same remapping — it wouldn't simplify anything for anybody.)

    评论

报告相同问题?

悬赏问题

  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 HLs设计手写数字识别程序编译通不过
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 TYPCE母转母,插入认方向
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)