| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This is a GitHub repository template for Go. It has been created for ease-of-use for anyone who wants to:
It includes:
Star this repository if you find it valuable and worth maintaining.
Watch this repository to get notified about new releases, issues, etc.
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.
Follow these steps if you are OK installing and using Go on your machine.
Follow these steps if you do not want to install Go on your machine and you prefer to use a Development Container instead.
The Development Container configuration mixes Docker in Docker and Go definitions. Thanks to it you can use go, docker, docker-compose inside the container.
F1 → 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.
CAUTION: Make sure to understand the consequences before you bump the major version. More info: Go Wiki, Go Blog.
Remember to update Go version in .github/workflows, Makefile and devcontainer.json.
Notable files:
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 .devcontainer and .vscode directories if it really does not help you.
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.
Install tdm-gcc and copy C:\TDM-GCC-64\bin\mingw32-make.exe to C:\TDM-GCC-64\bin\make.exe. Alternatively, you may install mingw-w64 and copy mingw32-make.exe accordingly.
Alternatively use WSL (Windows Subsystem for Linux) or develop inside a Remote Container. However, take into consideration that then you are not going to use "bare-metal" Windows.
Install GoDownloader.
Execute:
godownloader --repo=your_org/repo_name > ./install.shPush install.sh to your repository.
Add installation instructions to your README.md e.g.:
curl -sSfL https://raw.githubusercontent.com/your_org/repo_name/main/install.sh | sh -s -- -b /usr/local/binTake a look at GoReleaser docs as well as its repo how it is dogfooding its functionality.
Change make target build to go build ./... Remove docker as a release option by removing the dockerfile, goreleaser docker section, and docker login on the github action. You can change the .goreleaser.yml to contain:
build:
skip: true
release:
github:
prerelease: autoAlternatively, you can completly remove the usage of GoReleaser if you prefer handcrafted release notes. Take a look how it is done in taskflow.
By default go test records code coverage for the package that is currently tested. If you want to get more accurate (cross-package) coverage, then consider using go-acc. Read more.
Auto-tagging can be done in many ways e.g. by using GitHub Actions like:
However, creating a release tag manually is often the optimal approach. Take notice that this template executes a release workflow each time a git tag with v prefix is pushed.
Simply create an issue or a pull request.
| Back | FazBrowse Home | New Git URL |