I have following source tree:
/main.go
/templates/t.tmpl
/pkg/templates.go
/pkg/templates_test.go
/pkg/templates.go defines use of
var t = template.Must(template.ParseFiles("templates/t.tmpl")
which is needed for normal project operation, because binary is called from root folder.
And then when I am debugging test from templates_test.go from vscode Must fails, because go test current directory is pkg and not project root
How to make vscode with go test to use root project folder?