3 ms·
My experience with go build ./... is that it compiles everything but it doesn't make the binaries. > When compiling multiple packages or a single non-main pack
by NAHWheatCracker 2y ago
My experience with go build ./... is that it compiles everything but it doesn't make the binaries.
> When compiling multiple packages or a single non-main package, build compiles the packages but discards the resulting object, serving only as a check that the packages can be built.
From https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependencies https://pkg.go.dev/cmd/go#hdr-Compile_packages_and_dependenc...
A bit annoying when you want to build a bunch of executables, but it's not something I need often and it's easy to script.
- arccy 2y agogo build -o some/dir/ ./... will actually output the binaries
- NAHWheatCracker 2y agoSick, I couldn't figure it out when I needed it so I just manually created a 20 line script to cd into each directory and go build.