I tried to compile a module with two packages in it but the go compiler said found packages handlers (handlers.go) and main (main.go) in <module path> where <module path> is the path of the module. Is it possible to compile a module which has two packages in its root directory? When I moved handlers.go into a subdirectory it compiled without any problem but in the go documentation I have never seen that a root module cannot contain more than one package
I advice you to follow the convention
https://github.com/golang-standards/project-layout/issues/117#issue-854742264
https://github.com/golang-standards/project-layout/issues/117#issuecomment-828442381
Thank you, I'll check it out
Обсуждают сегодня