当没有指定要构建的软件包时,“ go build”如何决定要构建的子目录?

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.

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.