• Stars
    star
    173
  • Rank 220,124 (Top 5 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created about 3 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

go/template is a tool for jumpstarting production-ready Golang projects quickly.

go/template

Coverage SIT CI Semgrep Go Report Card Go Reference

go/template provides a blueprint for production-ready Go project layouts.

go/template logo

Credit to Renée French for the Go Gopher logo
Credit to Go Authors for the official Go logo

Batteries included

  • Makefile for most common tasks
  • optimized Dockerfile
  • golangci-lint default configuration
  • pre-push git hook to ensure no linting issues
  • gRPC support
  • folder structure based on github.com/golang-standards/project-layout
  • enforced default packages
    • go.uber.org/zap for logging
    • go.uber.org/automaxprocs to be safe in container environments (see this article for more information)

Usage

Installation

From source

If you have Go 1.16+, you can directly install by running:

go install github.com/schwarzit/go-template/cmd/gt@latest

Based on your go configuration the go/template binary can be found in $GOPATH/bin or $HOME/go/bin in case $GOPATH is not set. Make sure to add the respective directory to your $PATH. For more information see go docs for further information. Run go env to view your current configuration.

From the released binaries

Download the desired version for your operating system and processor architecture from the go-template releases page. Make the file executable and place it in a directory available in your $PATH.

nix

go-template also provides a flake.nix to install it via nix package manager.

You can also try out go-template without installing:

nix run github:schwarzit/go-template

Preconditions

go/template's gt CLI requires at least the following executables on $PATH to run succesfully:

  • Go >= 1.15
  • Git

These are used at the end of gt new's execution to initialize Git and Go modules in the newly created project repository.

Initialize your repo from the template

asciicast

Use the template to generate your repo:

gt new

Initialize the project:

cd <your project>
make all

Options

To get an overview of all options that can be set for the template you can take a look at the options docs, run the CLI or check out the testing example values file.

Maintainers

Name
@brumhard
@linuxluigi
@danielzwink

Contribution

If you want to contribute to go/template please have a look at our contribution guidelines.

Releasing

The release process is described in the release docs.

More Repositories

1

abap_oo_patterns

Example implementation of OO design patterns in ABAP
ABAP
89
star
2

onyx

🚀 A design system and Vue.js component library created by Schwarz IT
TypeScript
52
star
3

node-red-chart

Node-red Helm Chart
Python
39
star
4

dagger-lightsaber

Lightsaber is a Dagger 2 plugin that flags the unused dependencies declared in your Modules and Components
Kotlin
24
star
5

sap-usi-logging-api

An easy-to-use, object-oriented encapsulation around the SAP application log (Transaction SLG1)
ABAP
23
star
6

api-linter-rules

Schwarz API rule definitions for the Spectral API linter
TypeScript
22
star
7

hypermatch

hypermatch is a high-performance ⚡ Go library designed for rapid matching of a large number of rules to events. It processes thousands of events per second 🚀 against extensive rule sets in-memory with minimal latency ⏱️.
Go
20
star
8

terraform-provider-stackit

Community-maintained STACKIT Terraform provider
Go
18
star
9

spectral-intellij-plugin

IntelliJ plugin for continuous OpenAPI linting using the Spectral OpenAPI linter
Kotlin
18
star
10

crystal-map

framework to generate map based entities classes / classes for named map interaction / parsing of complex classes to map structures
Kotlin
14
star
11

sap-usi

Overview of all Open Source SAP USI components
ABAP
8
star
12

swift-network-debugger

A Swift package designed to view your App's networking activity with minimal setup.
Swift
7
star
13

community-stackit-go-client

Community-maintained Go Client to interact with STACKIT APIs
Go
7
star
14

andksnackbar

Java
6
star
15

api-linter-service

RESTful service to provide API linting as-a-service
TypeScript
6
star
16

andcoachmark

Java
5
star
17

kokain

dependency injection framework for kotlin based applications
Kotlin
5
star
18

sci-rest-client

REST Client for the Integration Content API for SAP Cloud Integration
TypeScript
5
star
19

meet-it-alexa

Example code for the 2017/05/16 Meet IT workshop: »Amazon Echo mit eigenen Skills aufrüsten«
JavaScript
4
star
20

kisshop

KIS Shop - Demo for modern Enterprise App Development with Java and Angular
TypeScript
3
star
21

andswipeframework

just another swipe library
Java
3
star
22

andcircularselect

library for customisable circular picker
Java
3
star
23

java-code-review

Java Code Review Task
Java
3
star
24

runs-on-stackit

With the STACKIT-Badge you can mark internal and external websites and applications that run on, are sponsored or supported by STACKIT.
TypeScript
2
star
25

sap-usi-exception

A root exception, that is reused by other USI products and some helper classes to process exceptions
ABAP
2
star
26

php-remote-storage

A lightweight remote file storage library for PHP & Symfony. It provides one interface to interact with the commonly used remote filesystems, such as AWS S3
PHP
2
star
27

sap-usi-authority-check

Authority check - Dependency of SAP USI Logging
ABAP
1
star
28

go-code-review

Go
1
star