I want to create a package in Go with tests and examples for the package as subdirectories to keep the workspace cleaner. Is this possible and if so how?
All the docume
I normally don't do test, but you can group your file into directories and use import like
import "./models"
if is one level out
import "../models
if is one level out and one level in
For example, for:
./models/todo.go
./test/todo_test.go
to test todo.go
from todo_test.go
,
your import in the todo_test.go
will be
import "../models"