root folder and then some other files in subdir folder, but still on package main?
I wouldn't do that. I would instead put your main.go in /cmd/server/main.go
To keep the executable package separate to avoid polluting its package scope
if it's another folder it can't be the same package
okay then it was correct to have files in the handlers directory be in handlers package
https://stackoverflow.com/questions/6478962/what-does-the-dot-or-period-in-a-go-import-statement-do Here's some black magic you should never use but you might be interested in
Обсуждают сегодня