⭐ Star
this repository if you find it valuable and worth maintaining.
This is a GitHub repository template for a Go application
that uses goyek
for build automation.
It also includes:
- continuous integration via GitHub Actions,
- dependency management using Go Modules,
- code formatting using gofumpt,
- linting with golangci-lint,
- spell checking using misspell,
- unit testing with race detector, code covarage HTML report and Codecov report,
- dependencies scanning and updating thanks to Dependabot,
- security code analysis using CodeQL Action,
- Visual Studio Code configuration with Go support.
- Sign up on Codecov and configure Codecov GitHub Application for all repositories.
- Click the
Use this template
button (alt. clone, fork or download this repository). - Replace all occurrences of
goyek/template
toyour_org/repo_name
in all files. - 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 Visual Studio Go extension is officially supported by the Go team.
- Install Go.
- Install Visual Studio Code.
- Install Go extension.
- Clone and open this repository.
F1
->Go: Install/Update Tools
-> (select all) -> OK.
cd build
go run .
Using convenient Bash script:
./goyek.sh
Using convenient PowerShell script:
.\goyek.ps1
Using Visual Studio Code:
F1
→ Tasks: Run Build Task (Ctrl+Shift+B or ⇧⌘B)
Notable files:
- .github/workflows - GitHub Actions workflows,
- .github/dependabot.yml - Dependabot configuration,
- .vscode - Visual Studio Code configuration files,
- build - build pipeline used for local development, CI build, and .vscode/tasks.json,
- build/tools.go - build tools,
- .golangci.yml - golangci-lint configuration.