This is a
GitHub repository template for Golang.
It has been created for ease of use for anyone who wants to:
- quickly get into Go without losing too much time on environment setup,
- create a new repository with essential Continous Integration.
- continuous-integration via GitHub Actions,
- dependency management using Golang Modules,
- code formatting using gofumpt,
- linting with golangci-lint,
- build automation via Make,
- unit testing with testify, race detector, code coverage HTML report and Codecov report,
- releasing using GoReleaser,
- dependencies scanning and updating thanks to Dependabot,
- security code analysis using CodeQL Action,
- Visual Studio Code configuration with Go and Remote Container support.
Star this repository if you find it valuable and worth maintaining.
Watch this repository to get notified about new releases, issues, etc.
- Sign up on Codecov and configure Codecov GitHub Application for all repositories.
- Click the
Use this templatebutton (alt. clone or download this repository).
- Replace all occurrences of golang-templates/seed with your_org/repo_name in all files.
- Replace all occurrences of
- Update the following files:
Below you can find sample instructions on how to set up the development environment. Of course, you can use other tools like GoLand, Vim, Emacs. However, take notice that the Go team officially supports the Visual Studio Go extension.
Follow these steps if you are OK installing and using Go on your machine.
- Install Go.
- Install Visual Studio Code.
- Install Go extension.
- Clone and open this repository.
Go: Install/Update Tools-> (select all) -> OK.
Follow these steps if you do not want to install Golang on your machine and you prefer to use a Development Container instead.