Giter Site home page Giter Site logo

gootstrap's Introduction

Gootstrap

Build Status Go Report Card

Gootstrap stands for Go Bootstrap. It aims to provide bootstraping when starting Go projects, helping you to go from 0 to 100 and with some opinionated good practices/tooling like:

  • Reproducible builds
  • Versioned builds
  • Static Analysis
  • Coverage Analysis
  • Code Formatting
  • Continuous Integration
  • Git hooks
  • Tagged releases

The idea is to give a head start when starting a project not contemplate every detail that a project may need, so after generating the files you probably will need to add more things as necessary.

The generated project relies on Docker as a development environment build tool and releasing tool. But the generated code will also work with using Go directly from the command line in your host.

Install

To generate a project you need to install gootstrap, if you have Go installed in your host it is as easy as:

go install github.com/NeowayLabs/gootstrap/cmd/gootstrap

To use the generated project you will need Docker.

Usage

To quickly checkout how a project is generated run:

gootstrap -module "whatever.com/group/project" -image "group/project" -output-dir /tmp/test

And you can check your brand new project at /tmp/test, If no -output-dir is passed it defaults to the working directory where the command is being executed.

So if you already have a git repository created for your project (preferably empty) just clone the project and inside it run:

gootstrap -module "whatever.com/group/project" -image "group/project"

And it will generate all the files so you can start coding (you need to add the generated files to git manually).

The -module parameter is the name of the Go module exported by your project. Even if you are not developing a library this is necessary for imports inside your own project since it defines the full import path that you will use to import different packages inside your own project.

Previously to Go modules the import path of packages were defined by where they were in the file system, now the module declaration controls how packages are imported (their path). For more details on how Go modules works check this.

Any files that already exist on the given directory will be left untouched, gootstrap don't change any files or delete them.

Files will be generated assuming that your project builds a executable, like a command or a service/daemon. Support for libraries is yet to be built (although it is not hard to just delete the command related targets and files).

gootstrap's People

Contributors

katcipis avatar ppizarro avatar i4ki avatar cadicallegari avatar kamilash avatar leocbs avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.