My folders are structured as follows
src/
github.com/
hello/
hello.go
hello_test.go
integers/
integers.go
integers_test.go
hello.go/hello_test.go belong to package main integers.go/integers_test.go belong to package integers
When run go test from the root of folder hello, it only runs hello_test.go. How can i get it to run all tests recursively. Is this the right way to structure tests inside their respective packages?
Thanks!
How about having a make file? In the future if you expand your project and have more test files then you can test all of them at once by just running make test
. This link would be helpful.