I am currently starting with Go and have already dug into the dos and don'ts regarding package naming and workspace folder structure.
Nevertheless, I am not quite sure how to properly organize my code according to the Go paradigm.
Here is my current structure example as it resides in $GOPATH/src
:
github.com/myusername/project
|-- main.go
+-- internal
+---- config
|------ config.go
So i have the project called project
which uses the config
package which, in turn, is specialized in a way that it should only be used by project
. Hence, I do not want it under github.com/myusername/config
, right?
The question now is, is it "good" to use the internal package structure or should I instead put my project specific packages under github.com/myusername/$pkgname
and indicate somehow that it belongs to project
(e.g. name it projectconfig
)?