goat

command module
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2019 License: MIT Imports: 4 Imported by: 0

README

About:Goat

Goat is a simple golang: application template builder.

Generate template of your application, via chosen templates:

Installation

Just get it

go get -u github.com/spyzhov/goat

Basic usage

Change dir to targeted, run goat and answer for several questions.

user@user:/go/src/github.com/spyzhov/example$ goat
Project path [/go/src/github.com/spyzhov/example]? [Y/n]: y 
Project name [example]? [Y/n]: y
Repository name [github.com/spyzhov/example]? [Y/n]: y
Use Postgres connection (github.com/go-pg)? [y/N]: y
Use Postgres migrations (github.com/go-pg/migrations)? [y/N]: y
Use MySQL connection (github.com/go-sql-driver/mysql)? [y/N]: y
Use MySQL migrations (github.com/rubenv/sql-migrate)? [y/N]: y
Use HTTP server (net/http)? [y/N]: y
Use Prometheus (github.com/prometheus/client_golang)? [y/N]: y
Use RMQ-consumer (github.com/streadway/amqp)? [y/N]: y

And you will got :

├── app
│   ├── app.go
│   ├── config.go
│   ├── consumer.go
│   ├── http.go
│   ├── logger.go
│   └── publish.go
├── Dockerfile
├── Gopkg.toml
├── main.go
├── migrations
│   ├── 01_init.go
│   ├── mysql
│   │   └── 1-init.sql
│   ├── mysql.go
│   └── postgres.go
├── README.md
└── signals
    └── signals.go

Use dep

The best and quickest way to start:

user@user:/go/src/github.com/spyzhov/example$ goat
...
user@user:/go/src/github.com/spyzhov/example$ dep ensure
...
... Profit!

License

MIT licensed. See the LICENSE file for details.

TODO

  • validation for path;
  • add versions for libs;
  • add choice for http clients (native/fasthttp/echo/etc.);
  • remove code "noodles" - make module append methods;
  • normalize migrations;
  • add Redis support "github.com/gomodule/redigo/redis";

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL