If you write your tests with Ginkgo [0] its CLI can do this for you.
It also has nice facilities to quickly disable a test or portion of a test by prepending an X to the test function name, or to focus a test (only run that test) by prepending an F. It’s pretty nice.