My project folder contains:
Makefile README.md component/ driver/ service/ vendor/ worker/
I want to run go test in all test files, for example. foobar_test.go , excluding test files in the vendor package. The closest I have succeeded is go test ./... , but this includes the vendor test files.
I saw in the documentation that you can pass a regular expression to the -run parameter, but I had problems with its operation. For example, I tried go test ./* , but I get a bunch of can't load package errors .
What is the best way to do this?
source share