also used this structure but again import cycle error returned
https://github.com/golang-standards/project-layout
where do you have a cycle?
consider these paths /internal/services/http.go /internal/services/websocket.go /web/controllers/room.go if I call a function that is in room controller in http file and call a function that is in websocket file in room controller then cycle happens anyway I changed project folders again and for now its fixed :)
if you have a package import cycle, you should rethink about the project architecture not just the packages.
Обсуждают сегодня