About:Goat
Goat is golang: application template
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
With postgres migrations (github.com/go-pg/migrations)? [Y/n]: y
Use MySQL connection (github.com/go-sql-driver/mysql)? [y/N]: y
With MySQL migrations (github.com/rubenv/sql-migrate)? [Y/n]: y
Use HTTP server (het/http)? [y/N]: y
Use Prometheus (github.com/prometheus/client_golang)? [y/N]: y
Use RMQ-consumers (github.com/streadway/amqp)? [y/N]: y
Use RMQ-publishers (github.com/streadway/amqp)? [y/N]: y
And you will got :
├── app
│ ├── app.go
│ ├── config.go
│ ├── consumer.go
│ ├── http.go
│ └── publish.go
├── Dockerfile
├── main.go
├── migrations
│ ├── 01_init.go
│ ├── mysql
│ │ └── 1-init.sql
│ ├── mysql.go
│ └── postgres.go
├── README.md
└── signals
└── signals.go
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 init
...
... Profit!
License
MIT licensed. See the LICENSE file for details.
TODO
- fix babex usage;
- add choice for http clients (native/fasthttp/echo/etc.);
- remove code "noodles" - make module append methods;
- normalize migrations;