• Stars
    star
    147
  • Rank 242,527 (Top 5 %)
  • Language
    Go
  • License
    MIT License
  • Created over 5 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Generate scaffold project layout for Go.

scaffold

Build Status codecov Go Report Card GoDoc

Scaffold generates starter Go project layout. Let you can focus on buesiness logic implemeted.

asciicast

The following is Go project layout scaffold generated:

β”œβ”€β”€ Dockerfile
β”œβ”€β”€ Makefile
β”œβ”€β”€ README.md
β”œβ”€β”€ cmd
β”‚   └── main.go
β”œβ”€β”€ config
β”‚   β”œβ”€β”€ config.go
β”‚   β”œβ”€β”€ config.yml
β”‚   β”œβ”€β”€ database.go
β”‚   β”œβ”€β”€ http.go
β”‚   └── release.go
β”œβ”€β”€ docker-compose.yml
β”œβ”€β”€ model
β”‚   └── model.go
└── web
    β”œβ”€β”€ routes.go
    β”œβ”€β”€ server.go
    └── version.go

Installation

Download scaffold by using:

$ go get -u github.com/catchplay/scaffold

Create a new project

  1. Going to your new project folder:
# change to project directory
$ cd $GOPATH/src/path/to/project
  1. Run scaffold init in the new project folder:
$ scaffold init
  1. That will generate a whole new starter project files like:
Create Dockerfile
Create README.md
Create cmd/main.go
Create config/config.go
Create config/database.go
Create config/http.go
Create config/release.go
Create docker-compose.yml
Create model/model.go
Create web/routes.go
Create web/server.go
Create web/version.go
Create Makefile
Create config/config.yml
Success Created. Please excute `make up` to start service.

  1. And you can run the new project by using:
$ make run