I feel the pending 'close question, too vague, opinions,...' but here goes.
How do I organize my go codebase?
I have a non trivial app (unix daemon) that talks to other processes, read/writes a database, talks to a web server, has internal state. In c++ i would write a bunch of classes (probably in subdirectories for the main subcomponents). Lets say that this is projd
Then at a higher level I have utility cli functions associated with the project. projcli1, projcli2.... I assume all the code associated with one project goes under one GOPATH
What If i was working on several unrelated projects. Do I still use one GOPATH or do I have one per project.
I tried to find sample code bases but the only large set is the packages repository, and that's a bunch of libraries - which is not really the same thing.
If those questions are too vague how about this. Is it correct that all the go files in the same directory have to be for the same package?
Another simple specific question. I found a nice implementation of an object pool. Its package says "pool" - fine. Where do I put its single file. In a subdir called 'pool', I would like to have a dir called utils (or something like that) seems like I cannot do it. I mean I cant have utils/pool and util/db (say) without having a tree of one file dirs