How to organize project sturcture

As I come from Django project structure was handled for me by default, now I’m in Go how should I structure my project?
In Django:

appAuth     // Like handlers        // The httprouter
    -templates   //tmpl
mainApp      //The main router file which points to all other routing files   //Point out to all middlewares and tell if we are in production or local

Does Go follow something like this? If yes then how can I achieve this? When I tried to do so it gave me an error saying (package main doesn’t have function). From what I understand since the go file is not in the same directory then it can’t see the function main and the main.go can’t access function from it, So how can I exactly structure my file? Thanks

This is what I try to follow :

I am fairly new to Go myself though, but so far this have worked for me.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.