Gootstrap is a simple Go package bootstrapper

Hi guys,

I’ve been doing some projects and have noticed that I was repeating myself a lot while creating new packages, so I’ve decided to create this simple package in order to bootstrap new packages. It creates this structure:

$ gootstrap new project_name
$ gootstrap new project_name
===> Creating package project_name
===> Creating directory
===> Creating .gitignore file
===> Creating .travis.yml file
===> Creating README.md
===> Creating LICENSE.txt file
===> Creating project_name.go file
===> Creating project_name_test.go file
===> Creating doc.go file
===> Package created! cd project_name to access.
$ cd project_name

|-- project_name
    |-- .gitignore
    |-- .travis.yml
    |-- REAMDE.md
    |-- LICENSE.txt
    |-- project_name.go
    |-- project_name_test.go
    |-- doc.go

But it can be customized like this:

$ gootstrap new project_name --minimal
===> Creating package project_name
===> Creating directory
===> Creating project_name.go file
===> Creating project_name_test.go file
===> Creating doc.go file
===> Package created! cd project_name to access.
$ cd project_name

|-- project_name
    |-- project_name.go
    |-- project_name_test.go
    |-- doc.go

Or even like this:

$ gootstrap new project_name --no-travis-lisence
===> Creating package project_name
===> Creating directory
===> Creating .gitignore file
===> Creating README.md
===> Creating project_name.go file
===> Creating project_name_test.go file
===> Creating doc.go file
===> Package created! cd project_name to access.
$ cd project_name

|-- project_name
    |-- .gitignore
    |-- REAMDE.md
    |-- project_name.go
    |-- project_name_test.go
    |-- doc.go

The link is https://github.com/hgsigner/gootstrap
I hope it can be useful for someone as it is for me.

Best,
Hugo

5 Likes

Amazing, but there is a little confusing typo in README.md:

After installing, you can use gootstrap new package_name to create a new project.
$ goostrap new project_name
......^here it is

Awesome job though

1 Like

This is very useful!!! Will go get. I have been wanting this. As of 1444675118, you are my best friend today

I wish we could extend it to customize to meet team structures. For instance, some people like a credits.txt file, some people like a changelog.md file. Some people hate conforming.

It would be cool to build off of this and see if we could create a generator that can use templates across the web. Sort of like Yo but in Go (instead of JavaScript), and without all the pirate talk.

I know that Docker would be a different structure than a web app.

1 Like

Oh, man! Thanks for pointing this typo! I’ve already fixed it!

Nice suggestion! I’ll think about how to implement it.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.