golang-templates/seed alternatives and similar packages
Based on the "Project Layout" category.
Alternatively, view golang-templates/seed alternatives based on common mentions on social networks and blogs.
Standard Go Project Layout
Starter code for writing web services in Go using Kubernetes.
An opinionated production-ready SQL-/Swagger-first RESTful JSON API written in Go, highly integrated with VSCode DevContainers by allaboutapps.
My understanding of how to structure a golang project.
Do you think we are missing an alternative of golang-templates/seed or a related project?
Go Repository Template
Star this repository if you find it valuable and worth maintaining.
Watch this repository to get notified about new releases, issues, etc.
This is a GitHub repository template for a Go application. You can use it:
- to create a new repoisitory with automation and environment setup,
- as reference when improving automation for an existing repository.
- continuous integration via GitHub Actions,
- build automation via Make,
- dependency management using Go Modules,
- code formatting using gofumpt,
- linting with golangci-lint and misspell,
- unit testing with race detector, code covarage 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 support.
- 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
your_org/repo_namein 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 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.
Go: Install/Update Tools-> (select all) -> OK.
make- execute the build pipeline.
make help- print help for the [Make targets](Makefile).
Visual Studio Code
Tasks: Run Build Task (Ctrl+Shift+B or ⇧⌘B) to execute the build pipeline.
The release workflow is triggered each time a tag with
v prefix is pushed.
- [.github/workflows](.github/workflows) - GitHub Actions workflows,
- [.github/dependabot.yml](.github/dependabot.yml) - Dependabot configuration,
- [.vscode](.vscode) - Visual Studio Code configuration files,
- [.golangci.yml](.golangci.yml) - golangci-lint configuration,
- [.goreleaser.yml](.goreleaser.yml) - GoReleaser configuration,
- [Dockerfile](Dockerfile) - Dockerfile used by GoReleaser to create a container image,
- [Makefile](Makefile) - Make targets used for development, [CI build](.github/workflows) and [.vscode/tasks.json](.vscode/tasks.json),
- [go.mod](go.mod) - Go module definition,
- [tools.go](tools.go) - build tools.
Why Visual Studio Code editor configuration
Developers that use Visual Studio Code can take advantage of the editor configuration. While others do not have to care about it. Setting configs for each repo is unnecessary time consuming. VS Code is the most popular Go editor (survey) and it is officially supported by the Go team.
You can always remove the [.vscode](.vscode) directory if it really does not help you.
Why GitHub Actions, not any other CI server
GitHub Actions is out-of-the-box if you are already using GitHub. Here you can learn how to use it for Go.
However, changing to any other CI server should be very simple, because this repository has build logic and tooling installation in [Makefile](Makefile).
How can I build on Windows
Take a look here, if you have problems using Docker in Git Bash.
Consider using goyek for creating cross-platform build pipelines in Go.
How can I customize the release
If you are developing a library and you like handcrafted changelog and release notes, you are free to remove any usage of GoReleaser.
Feel free to create an issue or propose a pull request.
Follow the [Code of Conduct](CODE_OF_CONDUCT.md).
*Note that all licence references and agreements mentioned in the golang-templates/seed README section above are relevant to that project's source code only.