Does your main_test.go file declare a package “main_test”? (The error message indicates this.) If so, change this to package main. Then your test code is in the same package as the main code and needs no import.
If this still does not work, please post minimal sample code (a main.go and a main_test.go file with just enough code to trigger the error). I feel that there is currently too much guesswork going on, it would be helpful to have a complete test case available to reason about.