gogo-testinggo-build

Building go tests from multiple packages into single file


Is there any way to build all the test files in a project located inside multiple packages into a single binary file? To build binary inside a single package, I could use go test -c.

I need something like go test ./... -c,but this returns "cannot use -c flag with multiple packages"


Solution

  • Is there any way to build all the test files in a project located inside multiple packages into a single binary file?

    No.