Written by
Edd Turtle
on gophercoding.com
on
on
(Updated: )
Run Tests in All Packages
Life can be simple when all your Go files are in the root folder. But when a project gets a bit bigger, you may want to store much of the logic in packages. The issue comes when our usual command of go test
then no longer picks up our tests.
This post is a super-quick way of running your tests across these folders/packages.
|
|
We’ve add in the -v
flag too, which isn’t required, but will list out the tests it’s running.
Here’s our example:
|
|