Skip to content

streamdal/go-template

Repository files navigation

go-template

This is a Golang microservice template.

It uses:

  1. httprouter for the router
  2. logrus for logging
  3. envconfig for env parser
  4. kingpin for CLI args

To use this template:

  1. Use Github template to generate new project
  2. Replace the strings go-template and GO_TEMPLATE with preferred service-name and SERVICE_NAME. Ignore sed: RE error: illegal byte sequence
    1. find . -maxdepth 3 -type f -exec sed -i "" 's/go-template/service-name/g' {} \;
    2. find . -maxdepth 3 -type f -exec sed -i "" 's/GO_TEMPLATE/SERVICE_NAME/g' {} \;
    3. mv .github.rename .github