Re:Ask HN: How are you using Go to write production-grade ba...
by bradleyankrom on Thursday April 16, 2020 @08:04PM
(#22894892)
Appreciate the thoroughness of your comment (if you expand further in blog posts, I’ll read em). How did you settle on your standard project structure and what does it look like?
[ Parent
| on HN ]
Re:Ask HN: How are you using Go to write production-grade ba...
by sethammons on Friday April 17, 2020 @11:30AM
(#22899869)
Here is a fairly typical project structure you would find in one of our projects
/.buildkite
/.github
/acceptance # for housing the acceptance level tests
/bin # scripts to help
/config # an anti-pattern, but we like a config package
/config.go
/tests
/ # misc go files for testing
/$foo # any other packages directly related to tests or the environment
/bin # any scripts to help with anything
/cmd
/$appname
/main.go
/$bar # any other installable binaries
/config # an anti-pattern, but we like a config package
/config.go
/$raz # packages that support our service
/internal # stuff we want to import but not let others import. Seldom used.
/server # or $appname, our main service code
.gitignore
.Dockerfile
README.md
docker-compose.yml
go.mod
go.sum
makefile