Hi.
I built an application in the root folder with *.go package set to main.
I also build some test *_test.go in the same ‘root’ directory.
So anyway I moved ALL my *_test.go files to a sub folder ‘test’. I changed the package names to ‘test’ but the test code cannot access the code in the root (main) dir.
Is there a way of importing …/. as in a relative ‘up one level’ because I cannot make it work.
I spent hours making a go.mod. Do I require a go.mod file and all that implies, ‘go mod tidy’ ‘requires’ with package names etc.
What is the best/simplest way to isolate the tests from the code.
I have to say that I find the modules structure very confusing.
Please help
Stuart