I\'m a newcomer to Go. I extremely like the language, but I quickly realised that I needed to start dividing my files due to an increase in program size.
go r
The best way to do it is to run it like this:
go run !(*_test).go
It skips all your test files which is exactly what you need to avoid the error.
The other suggestion:
go build && ./
is a bit annoying. You have to delete the executable all the time to avoid being marked by git. You can put it in gitignore, of course, but I am lazy and this is an extra step.