Standart way: goapp test
— doesn't work.
Output:
D:\Projects\MyProject>goapp test
can't load package: package .: no buildable Go source files in D:\Projects\MyProject
goapp test
looks for *_test.go
files in the current directory if you don't specify the packages as parameters.
So either:
XX_test.go
files then execute the goapp test
commandgoapp test ./my/package
Read more about Local Unit Testing for Go.