goyek repository template
Star this repository if you find it valuable and worth maintaining.
Description
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.
Usage
- Sign up on Codecov and configure Codecov GitHub Application for all repositories.
- Click the
Use this templatebutton (alt. clone, fork or download this repository). - Replace all occurrences of
goyek/templatetoyour_org/repo_namein all files. - Update the following files:
Setup
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.
Build
cd build
go run .Using convenient Bash script:
./goyek.shUsing convenient PowerShell script:
.\goyek.ps1Using Visual Studio Code:
F1 → Tasks: Run Build Task (Ctrl+Shift+B or ⇧⌘B)
Maintenance
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.