HTTPS SSH

cookiecutter-go

A template to generate a new golang project

Usage

Install cookiecutter command line:

pip install cookiecutter

Switch to a project folder and generate the cookiecutter template:

cookiecutter bb:greenguavalabs/cookiecutter-go.git

Features

Development environment

The cookiecutter-go template generates a Docker based development environment for golang projects. The following make tasks are available to operate the dev env.

Manage the development environment:

  • make init - Bring up the docker container
  • make clean - Stop and remove docker container

Verify and test project code:

  • make bins - Build all project binaries
  • make lint - Run lint tools on all project files
  • make test - Run all project test

CLI

The cookiecutter-go template provides you the option to generate golang packages for building a command line app using the github.com/spf13/cobra framework.

To generate the cli packages chose 1 at the prompt below:

Select cli:
1 - yes
2 - no
Choose from 1, 2 [1]:

License

This project is licensed under the terms of the MIT License