英文:
How do I upgrade one of the subpackages in golang?
问题
E.g.,github安全警报发出信号:
> 将github.com/opencontainers/runc升级到1.0.0-rc95版本或更高版本。例如:
如何在golang中进行最小代码更改?此包未在go.mod
中声明(似乎是间接依赖)。
当我运行go get -u
时,我可以看到一堆间接依赖项添加到我的go.mod
中,这有点过度:
require (
cloud.google.com/go v0.N.0 // indirect <--------
有没有一种直接更新该依赖项的方法?
英文:
E.g., github security alery signaled:
> Upgrade github.com/opencontainers/runc to version 1.0.0-rc95 or later. For example:
How can I do it in golang with minimal code changes? This package is not being declared in go.mod
(seems like it's indirect dependency).
When I run go get -u
, I can see a whole bunch of undirect dependencies added to my go.mod
which is a bit overkill:
require (
cloud.google.com/go v0.N.0 // indirect <--------
Is there a way to update directy that dependency?
答案1
得分: 1
确信go get -u github.com/opencontainers/runc
就可以了。
英文:
Pretty sure go get -u github.com/opencontainers/runc
should do it.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论