英文:
How does `go build` decide which subdirectories to build when it is not given specific packages to build?
问题
我最近注意到go build -a
命令会构建几乎所有的子目录中的包,但并非全部。
go build
命令使用什么算法来决定要构建什么?
go
命令的文档没有具体说明,或者我可能读错了。
英文:
I have recently noticed that go build -a
will build almost all, but not all packages in the subdirectories of my $GOPATH
.
What algorithm does go build
use to decide what to build?
The documentation for the go
command did not specify, or I misread it.
答案1
得分: 3
如果没有指定路径,'go build'命令将在当前目录中构建包。文档在这里。
'go build'命令还会构建任何过期的依赖项。
英文:
If no path is specified, the 'go build' command builds the package in the current directory. The documentation is here.
The 'go build' command also builds any out of date dependencies.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论