{"id":13413465,"url":"https://github.com/golang-templates/seed","last_synced_at":"2025-10-04T00:50:04.171Z","repository":{"id":37981903,"uuid":"260322624","full_name":"golang-templates/seed","owner":"golang-templates","description":"Go application GitHub repository template.","archived":false,"fork":false,"pushed_at":"2025-06-30T13:01:36.000Z","size":1804,"stargazers_count":529,"open_issues_count":0,"forks_count":57,"subscribers_count":7,"default_branch":"main","last_synced_at":"2025-06-30T14:22:15.498Z","etag":null,"topics":["codecov","docker","github-actions","go","golang","golangci-lint","goreleaser","makefile","repository-template","visual-studio-code","vscode"],"latest_commit_sha":null,"homepage":"","language":"Makefile","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/golang-templates.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-04-30T21:31:36.000Z","updated_at":"2025-06-30T13:01:39.000Z","dependencies_parsed_at":"2023-10-12T16:10:54.221Z","dependency_job_id":"51d989db-13a2-4262-8c4f-395481c855a7","html_url":"https://github.com/golang-templates/seed","commit_stats":null,"previous_names":["golang-templates/library","golang-templates/basic"],"tags_count":54,"template":true,"template_full_name":null,"purl":"pkg:github/golang-templates/seed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang-templates%2Fseed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang-templates%2Fseed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang-templates%2Fseed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang-templates%2Fseed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/golang-templates","download_url":"https://codeload.github.com/golang-templates/seed/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/golang-templates%2Fseed/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262850294,"owners_count":23374356,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["codecov","docker","github-actions","go","golang","golangci-lint","goreleaser","makefile","repository-template","visual-studio-code","vscode"],"created_at":"2024-07-30T20:01:40.985Z","updated_at":"2025-10-04T00:49:59.132Z","avatar_url":"https://github.com/golang-templates.png","language":"Makefile","funding_links":[],"categories":["Miscellaneous","杂项","Makefile","Shell","Project Layout","vscode","Microsoft Office"],"sub_categories":["Project Layout","项目布局"],"readme":"# Go Repository Template\n\n[![Keep a Changelog](https://img.shields.io/badge/changelog-Keep%20a%20Changelog-%23E05735)](CHANGELOG.md)\n[![Go Reference](https://pkg.go.dev/badge/github.com/golang-templates/seed.svg)](https://pkg.go.dev/github.com/golang-templates/seed)\n[![go.mod](https://img.shields.io/github/go-mod/go-version/golang-templates/seed)](go.mod)\n[![LICENSE](https://img.shields.io/github/license/golang-templates/seed)](LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/golang-templates/seed)](https://goreportcard.com/report/github.com/golang-templates/seed)\n[![Codecov](https://codecov.io/gh/golang-templates/seed/branch/main/graph/badge.svg)](https://codecov.io/gh/golang-templates/seed)\n\n⭐ `Star` this repository if you find it valuable and worth maintaining.\n\n👁 `Watch` this repository to get notified about new releases, issues, etc.\n\n## Description\n\nThis is a GitHub repository template for a Go application.\nYou can use it:\n\n- to create a new repository with automation and environment setup,\n- as reference when improving automation for an existing repository.\n\nIt includes:\n\n- continuous integration via [GitHub Actions](https://github.com/features/actions),\n- build automation via [Make](https://www.gnu.org/software/make),\n- dependency management using [Go Modules](https://github.com/golang/go/wiki/Modules),\n- code formatting using [gofumpt](https://github.com/mvdan/gofumpt),\n- linting with [golangci-lint](https://github.com/golangci/golangci-lint)\n  and [misspell](https://github.com/client9/misspell),\n- unit testing with\n  [race detector](https://blog.golang.org/race-detector),\n  code coverage [HTML report](https://blog.golang.org/cover)\n  and [Codecov report](https://codecov.io/),\n- releasing using [GoReleaser](https://github.com/goreleaser/goreleaser),\n- dependencies scanning and updating thanks to [Dependabot](https://dependabot.com),\n- security code analysis using [CodeQL Action](https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/about-code-scanning),\n  and [govulncheck](https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck),\n- [Visual Studio Code](https://code.visualstudio.com) configuration with [Go](https://code.visualstudio.com/docs/languages/go) support.\n\n## Usage\n\n1. Sign up on [Codecov](https://codecov.io/) and configure\n   [Codecov GitHub Application](https://github.com/apps/codecov).\n1. Click the `Use this template` button (alt. clone or download this repository).\n1. Replace all occurrences of `golang-templates/seed` to `your_org/repo_name` in all files.\n1. Replace all occurrences of `seed` to `repo_name` in [Dockerfile](Dockerfile).\n1. Follow [these](https://docs.codecov.com/docs/adding-the-codecov-token#github-actions)\n   instructions to add the `CODECOV_TOKEN` GitHub Actions and Dependabot secret.\n1. Update the following files:\n   - [CHANGELOG.md](CHANGELOG.md)\n   - [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)\n   - [LICENSE](LICENSE)\n   - [README.md](README.md)\n\n## Setup\n\nBelow you can find sample instructions on how to set up the development environment.\nOf course, you can use other tools like [GoLand](https://www.jetbrains.com/go/),\n[Vim](https://github.com/fatih/vim-go), [Emacs](https://github.com/dominikh/go-mode.el).\nHowever, take notice that the Visual Studio Go extension is\n[officially supported](https://blog.golang.org/vscode-go) by the Go team.\n\n1. Install [Go](https://golang.org/doc/install).\n1. Install [Visual Studio Code](https://code.visualstudio.com/).\n1. Install [Go extension](https://code.visualstudio.com/docs/languages/go).\n1. Clone and open this repository.\n1. `F1` -\u003e `Go: Install/Update Tools` -\u003e (select all) -\u003e OK.\n\n## Build\n\n### Terminal\n\n- `make` - execute the build pipeline.\n- `make help` - print help for the [Make targets](Makefile).\n\n### Visual Studio Code\n\n`F1` → `Tasks: Run Build Task (Ctrl+Shift+B or ⇧⌘B)` to execute the build pipeline.\n\n## Release\n\nThe release workflow is triggered each time a tag with `v` prefix is pushed.\n\n_CAUTION_: Make sure to understand the consequences before you bump the major version.\nMore info: [Go Wiki](https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher),\n[Go Blog](https://blog.golang.org/v2-go-modules).\n\n## Maintenance\n\nNotable files:\n\n- [.github/workflows](.github/workflows) - GitHub Actions workflows,\n- [.github/dependabot.yml](.github/dependabot.yml) - Dependabot configuration,\n- [.vscode](.vscode) - Visual Studio Code configuration files,\n- [.golangci.yml](.golangci.yml) - golangci-lint configuration,\n- [.goreleaser.yml](.goreleaser.yml) - GoReleaser configuration,\n- [Dockerfile](Dockerfile) - Dockerfile used by GoReleaser to create a container image,\n- [Makefile](Makefile) - Make targets used for development, [CI build](.github/workflows) and [.vscode/tasks.json](.vscode/tasks.json),\n\n## FAQ\n\n### Why Visual Studio Code editor configuration\n\nDevelopers that use Visual Studio Code can take advantage of the editor configuration.\nWhile others do not have to care about it.\nSetting configs for each repo is unnecessary time consuming.\nVS Code is the most popular Go editor ([survey](https://blog.golang.org/survey2019-results))\nand it is officially [supported by the Go team](https://blog.golang.org/vscode-go).\n\nYou can always remove the [.vscode](.vscode) directory if it really does not help you.\n\n### Why GitHub Actions, not any other CI server\n\nGitHub Actions is out-of-the-box if you are already using GitHub.\n[Here](https://github.com/mvdan/github-actions-golang) you can learn how to use it for Go.\n\nHowever, changing to any other CI server should be very simple,\nbecause this repository has build logic and tooling installation in [Makefile](Makefile).\n\n### How can I build on Windows\n\nInstall [tdm-gcc](https://jmeubank.github.io/tdm-gcc/)\nand copy `C:\\TDM-GCC-64\\bin\\mingw32-make.exe`\nto `C:\\TDM-GCC-64\\bin\\make.exe`.\nAlternatively, you may install [mingw-w64](http://mingw-w64.org/doku.php)\nand copy `mingw32-make.exe` accordingly.\n\nTake a look [here](https://github.com/docker-archive/toolbox/issues/673#issuecomment-355275054),\nif you have problems using Docker in Git Bash.\n\nYou can also use [WSL (Windows Subsystem for Linux)](https://docs.microsoft.com/en-us/windows/wsl/install-win10)\nor develop inside a [Remote Container](https://code.visualstudio.com/docs/remote/containers).\nHowever, take into consideration that then you are not going to use \"bare-metal\" Windows.\n\nConsider using [goyek](https://github.com/goyek/goyek)\nfor creating cross-platform build pipelines in Go.\n\n### How can I customize the release\n\nTake a look at GoReleaser [docs](https://goreleaser.com/customization/)\nas well as [its repo](https://github.com/goreleaser/goreleaser/)\nhow it is dogfooding its functionality.\nYou can use it to add deb/rpm/snap packages, Homebrew Tap, Scoop App Manifest etc.\n\nIf you are developing a library and you like handcrafted changelog and release notes,\nyou are free to remove any usage of GoReleaser.\n\n## Contributing\n\nFeel free to create an issue or propose a pull request.\n\nFollow the [Code of Conduct](CODE_OF_CONDUCT.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolang-templates%2Fseed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgolang-templates%2Fseed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgolang-templates%2Fseed/lists"}