My package test cases are scattered across multiple files, if I run go test it runs all test cases in the package.
It is unnecessar
@zzzz's answer is mostly complete, but just to save others from having to dig through the referenced documentation you can run a single test in a package as follows:
go test packageName -run TestName
Note that you want to pass in the name of the test, not the file name where the test exists.
The -run flag actually accepts a regex so you could limit the test run to a class of tests. From the docs:
-run regexp
Run only those tests and examples matching the regular
expression.