All Projects → lacion → Cookiecutter Golang

lacion / Cookiecutter Golang

Licence: mit
A Go project template

Programming Languages

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

Projects that are alternatives of or similar to Cookiecutter Golang

Wemake Python Package
Bleeding edge cookiecutter template to create new python packages
Stars: ✭ 235 (-46.22%)
Mutual labels:  cookiecutter, project-template
Copier
Library and command-line utility for rendering projects templates.
Stars: ✭ 277 (-36.61%)
Mutual labels:  cookiecutter, project-template
qt-qml-project-template-with-ci
Template for a Qt/QML application with batteries included: GitHub C.I. for your QML app; automated gui testing with Xvfb; automatic code-format checks and more. Compiles for Desktop and Mobile (Linux, Mac, Windows, and Android).
Stars: ✭ 33 (-92.45%)
Mutual labels:  project-template, cookiecutter
Cookiecutter Django
Cookiecutter Django is a framework for jumpstarting production-ready Django projects quickly.
Stars: ✭ 8,826 (+1919.68%)
Mutual labels:  project-template, cookiecutter
flask-project-template
DO NOT FORK, CLICK "Use this template" - A github template to start a Flask Project - this uses github actions to generate your project based on the template.
Stars: ✭ 74 (-83.07%)
Mutual labels:  project-template, cookiecutter
cookiecutter-flask-react
Cookiecutter for a Flask+React project
Stars: ✭ 22 (-94.97%)
Mutual labels:  cookiecutter
Cleancppproject
Clean C++ project for you to use. Features: Modern CMake, CPack, Doxygen, PlantUML, Catch Unit testing, static analysis
Stars: ✭ 276 (-36.84%)
Mutual labels:  project-template
cookiecutter-django-dokku
A template for jumpstarting Django projects and deploying with Dokku.
Stars: ✭ 16 (-96.34%)
Mutual labels:  cookiecutter
cookiedozer
📱 Cookiecutter for i18n Kivy Apps
Stars: ✭ 48 (-89.02%)
Mutual labels:  cookiecutter
Lein template descjop
A Leiningen template(Clojure/ClojureScript Project) for Web based desktop application with Electron (atom-shell).
Stars: ✭ 394 (-9.84%)
Mutual labels:  project-template
Aem Project Archetype
Maven template to create best-practice websites on AEM.
Stars: ✭ 337 (-22.88%)
Mutual labels:  project-template
Kotlin Android Mvp Starter
Create/Generate your kotlin MVP projects easily
Stars: ✭ 270 (-38.22%)
Mutual labels:  cookiecutter
skeleton-starter-flow-spring
Default project template for Vaadin using Spring Boot
Stars: ✭ 29 (-93.36%)
Mutual labels:  project-template
project-template
Sample Go Project Template (based on the layout from the Standard Project Layout repo)
Stars: ✭ 81 (-81.46%)
Mutual labels:  project-template
Python Package Template
🚀 Your next Python package needs a bleeding-edge project structure.
Stars: ✭ 356 (-18.54%)
Mutual labels:  cookiecutter
cookiecutter-mopidy-ext
cookiecutter template for creating a Mopidy extension
Stars: ✭ 15 (-96.57%)
Mutual labels:  cookiecutter
Cookie
A Template-based File Generator. Like cookiecutter but works with file templates instead of project templates.
Stars: ✭ 261 (-40.27%)
Mutual labels:  cookiecutter
Cpp Project
Boiler plate template for C++ projects, with CMake, Doctest, Travis CI, Appveyor, Github Actions and coverage reports.
Stars: ✭ 328 (-24.94%)
Mutual labels:  project-template
full-stack-flask-couchdb
Full stack, modern web application generator. Using Flask, CouchDB as database, Docker, Swagger, automatic HTTPS and more.
Stars: ✭ 28 (-93.59%)
Mutual labels:  cookiecutter
django-bootstrap-template
Template for a basic Django 4.0 site, with some helpful base objects, Bootstrap 4.6.0, FontAwesome 5.15.3 Free version, and starter templates.
Stars: ✭ 27 (-93.82%)
Mutual labels:  cookiecutter

cookiecutter-golang

Build Status

Powered by Cookiecutter, Cookiecutter Golang is a framework for jumpstarting production-ready go projects quickly.

Features

  • Generous Makefile with management commands
  • Uses go dep (with optional go module support requires go 1.11)
  • injects build time and git hash at build time.

Optional Integrations

  • Can use viper for env var config
  • Can use cobra for cli tools
  • Can use logrus for logging
  • Can create dockerfile for building go binary and dockerfile for final go binary (no code in final container)
  • If docker is used adds docker management commands to makefile
  • Option of TravisCI, CircleCI or None

Constraints

  • Uses dep or mod for dependency management
  • Only maintained 3rd party libraries are used.

This project now uses docker multistage builds, you need at least docker version v17.05.0-ce to use the docker file in this template, you can read more about multistage builds here.

Docker

This template uses docker multistage builds to make images slimmer and containers only the final project binary and assets with no source code whatsoever.

You can find the image dokcer file in this repo and more information about docker multistage builds in this blog post.

Apps run under non root user and also with dumb-init.

Usage

Let's pretend you want to create a project called "echoserver". Rather than starting from scratch maybe copying some files and then editing the results to include your name, email, and various configuration issues that always get forgotten until the worst possible moment, get cookiecutter to do all the work.

First, get Cookiecutter. Trust me, it's awesome:

$ pip install cookiecutter

Alternatively, you can install cookiecutter with homebrew:

$ brew install cookiecutter

Finally, to run it based on this template, type:

$ cookiecutter https://github.com/lacion/cookiecutter-golang.git

You will be asked about your basic info (name, project name, app name, etc.). This info will be used to customize your new project.

Warning: After this point, change 'Luis Morales', 'lacion', etc to your own information.

Answer the prompts with your own desired options. For example:

full_name [Luis Morales]: Luis Morales
github_username [lacion]: lacion
app_name [mygolangproject]: echoserver
project_short_description [A Golang project.]: Awesome Echo Server
docker_hub_username [lacion]: lacion
docker_image [lacion/docker-alpine:latest]: lacion/docker-alpine:latest
docker_build_image [lacion/docker-alpine:gobuildimage]: lacion/docker-alpine:gobuildimage
use_docker [y]: y
use_git [y]: y
use_logrus_logging [y]: y
use_viper_config [y]: y
use_cobra_cmd [y]: y
Select use_ci:
1 - travis
2 - circle
3 - none
Choose from 1, 2, 3 [1]: 1

Enter the project and take a look around:

$ cd echoserver/
$ ls

Run make help to see the available management commands, or just run make build to build your project.

$ make help
$ make build
$ ./bin/echoserver

Projects build with cookiecutter-golang

  • iothub websocket multiroom server for IoT
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].