Awesome Open Source
Awesome Open Source

Blueprint/Boilerplate For Golang Projects

Build Status Maintainability Rating Test Coverage Go Report Card

Blog Posts - More Information About This Repo

You can find more information about this project/repository and how to use it in following blog posts:

Setting Up

  • Replace All Occurrences of martinheinz/go-project-blueprint with your username repository name
  • Replace All Occurrences of blueprint with your desired image name

Adding New Libraries/Dependencies

go mod vendor

Using GitHub Registry

Create and Push:

docker login -u <USERNAME> -p <GITHUB_TOKEN>
docker build -t .
# make container
docker push
# make push

Pull and Run:

docker pull
docker run

Setup new SonarCloud Project

  • On SonarCloud:
    • Click Plus Sign in Upper Right Corner
    • Analyze New Project
    • Click GitHub app configuration link
    • Configure SonarCloud
    • Select Repository and Save
    • Go Back to Analyze Project
    • Tick Newly Added Repository
    • Click Set Up
    • Click Configure with Travis
    • Copy the Command to Encrypt the Travis Token
    • Run travis encrypt --com <TOKEN_YOU_COPPIED>
    • Populate the secure Field in .travis.yml with outputted string
    • Follow steps to populate your
    • Push
  • On Travis CI:
    • Set DOCKER_PASSWORD to Your GitHub Registry Token

Setup CodeClimate

  • Go to
  • Add Repository
  • Go to Test Coverage Tab
  • Copy Test Reporter ID
  • Go to Travis and Open Settings for Your Repository
  • Add Environment Variable: name: CC_TEST_REPORTER_ID, value: Copied from CodeClimate

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
golang (3,889
docker (2,923
makefile (790
boilerplate (639
blueprint (29