Normally my projects are fairly small, usually less than 5 packages, so it is really not a problem for me. I just dump them in a folder named pkg. I usually use this structure:
cmd pkg - pkg1 - pkg2 - ...
My question is if there is a purpose in Go for creating subfolders in the pkg folder, other that just grouping things together, that are related somehow?
cmd pkg - folder1 - pkg1 - pkg2 - folder2 - pkg3 - pkg4 - pkg5
And what happens if for example folder1 is not empty (ie contains a *.go file), would that create a “special” relationship between the package folder1 and pkg1 and pkg2 in any way?
cmd pkg - folder1 - main.go - pkg1 - main.go - pkg2 - main.go - ...
Or would they have no special relation at all (other than, that you decided yourself to group them together)?