gpt4 book ai didi

go - go get 中的 `...` 是什么意思

转载 作者:IT老高 更新时间:2023-10-28 13:02:20 24 4
gpt4 key购买 nike

我想安装 gb

安装步骤说要执行命令:

去 github.com/constabulary/gb/...

... 在这种情况下是什么意思?

最佳答案

...(省略号)告诉 go get 也获取包的子包/依赖项。

来自 go 帮助包:

An import path is a pattern if it includes one or more "..." wildcards, each of which can match any string, including the empty string and strings containing slashes. Such a pattern expands to all package directories found in the GOPATH trees with names matching the patterns. As a special case, x/... matches x as well as x's subdirectories. For example, net/... expands to net and packages in its subdirectories.

有关如何使用它的示例,请查看 this answer .

关于go - go get 中的 `...` 是什么意思,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31938346/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com