golang-templates / Seed

Licence: unlicense
Go application GitHub repository template.

Programming Languages

go
31211 projects - #10 most used programming language
golang
3204 projects

Projects that are alternatives of or similar to Seed

Freebsd Vscode
Visual Studio Code port for FreeBSD
Stars: ✭ 121 (+11.01%)
Mutual labels:  makefile, vscode
Vscode of
openFrameworks empty example for visual studio code
Stars: ✭ 129 (+18.35%)
Mutual labels:  makefile, vscode
Dotfiles
💻 Use command line interface manager for macOS configuration.
Stars: ✭ 97 (-11.01%)
Mutual labels:  makefile, vscode
Os
Open source security/privacy focused AOSP rom
Stars: ✭ 106 (-2.75%)
Mutual labels:  makefile
Crkbd
Corne keyboard, a split keyboard with 3x6 column staggered keys and 3 thumb keys.
Stars: ✭ 2,056 (+1786.24%)
Mutual labels:  makefile
Flowmaker
flowmaker: JS to SVG flowchart generation extension for Vscode in realtime written in typescript and also download the SVG through local node server. Extension:
Stars: ✭ 108 (-0.92%)
Mutual labels:  vscode
Acme Assembly Vscode Template
A template for compiling 6502 assembly code with ACME in VSCode
Stars: ✭ 109 (+0%)
Mutual labels:  vscode
D3 Bootstrap
[DEPRECATED] d3-friendly versions of Twitter bootstrap JavaScript tools
Stars: ✭ 105 (-3.67%)
Mutual labels:  makefile
Workflow Paper
The .md source for "The Plain Person's Guide to Plain Text Social Science". To exactly reproduce the PDF you will need current versions of R, TexLive, biber, and the support files at http://www.kieranhealy.org/resources.html.
Stars: ✭ 108 (-0.92%)
Mutual labels:  makefile
Code Server
VS Code in the browser
Stars: ✭ 50,541 (+46267.89%)
Mutual labels:  vscode
Urlmock
A Cocoa framework for mocking and stubbing URL requests and responses.
Stars: ✭ 107 (-1.83%)
Mutual labels:  makefile
Graphviz Scripts
Some dot files for graphviz
Stars: ✭ 106 (-2.75%)
Mutual labels:  makefile
Jmuduo
imitate a net library named muduo written by ChenShuo
Stars: ✭ 108 (-0.92%)
Mutual labels:  makefile
Awesome Safety Critical
List of resources about programming practices for writing safety-critical software.
Stars: ✭ 1,425 (+1207.34%)
Mutual labels:  makefile
Github Vsc
🐙 Launch VSCode dev environment in your browser.
Stars: ✭ 108 (-0.92%)
Mutual labels:  vscode
Kamasutra Cn
那啥经(梵汉对照)- for Chinese only
Stars: ✭ 106 (-2.75%)
Mutual labels:  makefile
Python Jenkins Template
Template for Jenkins jobs for python projects.
Stars: ✭ 108 (-0.92%)
Mutual labels:  makefile
Pingprom
Prometheus uptime monitoring quickstart
Stars: ✭ 107 (-1.83%)
Mutual labels:  makefile
Rprogdatascience
Stars: ✭ 108 (-0.92%)
Mutual labels:  makefile
Vscode Solidity Auditor
Solidity language support and visual security auditor for Visual Studio Code
Stars: ✭ 108 (-0.92%)
Mutual labels:  vscode

Go Repository Template

GitHub Release Go Reference go.mod Build Status Go Report Card Codecov

This is a GitHub repository template for Go. It has been created for ease-of-use for anyone who wants to:

  • quickly get into Go without losing too much time on environment setup,
  • create a new repoisitory with basic Continous Integration.

It includes:

Star this repository if you find it valuable and worth maintaining.

Watch this repository to get notified about new releases, issues, etc.

Usage

  1. Sign up on Codecov and configure Codecov GitHub Application for all repositories.
  2. Click the Use this template button (alt. clone or download this repository).
  3. Replace all occurences of golang-templates/seed to your_org/repo_name in all files.
  4. Rename folder cmd/seed to cmd/app_name and update .goreleaser.yml accordingly.
  5. Update LICENSE and README.md.

Build

  • Terminal: make help to get help for make targets.
  • Visual Studio Code: TerminalRun Build Task... (CTRL+ALT+B) to execute a fast build.

Release

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.

Maintainance

Remember to update Go version in .github/workflows, Makefile and devcontainer.json.

Notable files:

FAQ

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 .devcontainer and .vscode directories 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.

You can also use the docker make target to run the build using a docker container.

How can I build on Windows

Install tdm-gcc and copy C:\TDM-GCC-64\bin\mingw32-make.exe to C:\TDM-GCC-64\bin\make.exe.

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.

How can I create an application installation script

  1. Install GoDownloader.
  2. Execute:
godownloader --repo=your_org/repo_name > ./install.sh
  1. Push install.sh to your repository.
  2. 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/bin

How can I create a Docker image, deb/rpm/snap package, Homebrew Tap, Scoop App Manifest etc.

Take a look at GoReleaser docs as well as its repo how it is dogfooding its functionality.

How can I create a library instead of an application

You can change the .goreleaser.yml to contain:

build:
  skip: true
release:
  github:
  prerelease: auto

Alternatively, you can completly remove the usage of GoReleaser if you prefer handcrafted release notes.

Why the code coverage results are not accurate

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.

How to automate generating git tags for next release version

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.

Contributing

Simply create an issue or a pull request.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].