I'm starting to experiment with Go and I'm facing an issue that (I think) doesn't exist in languages that use a virtual machine.
I have a src/test/main.go
file that references my templates inside src/test/views/
folder.
When I use go run main.go
it runs but when do go install
and then inside my bin
folder run the executable (./test
) I get an error:
views/edit.html: no such file or directory
So, how does Go compiles my project (file/folder structure related) and how to use paths in a way that allows me to use either go run
and go install/executable
?