Skip to content

izumin5210/scaffold

Repository files navigation

scaffold

Build Status Coverage Status MIT License Version

https://gyazo.com/756d165b512a3d93c08e2094eedecd86

Usage

Example

.scaffold

$ tree .scaffold
.scaffold
├── command
│   ├── app
│   │   └── cmd
│   │       ├── {{name}}.go
│   │       └── {{name}}_test.go
│   └── meta.toml
└── usecase
    ├── app
    │   └── usecase
    │       ├── {{name}}.go
    │       └── {{name}}_test.go
    └── meta.toml

$ scaffold g command destroy
       exist  .
       exist  app/cmd
      create  app/cmd/destroy.go
      create  app/cmd/destroy_test.go

$ ls app/cmd/destroy*
app/cmd/destroy.go
app/cmd/destroy_test.go

Available filters

  • toUpper
  • toLower
  • camelizer
  • pascalize
  • underscore
  • dasherize

Installation

macOS

Homebrew formula is available at izumin5210/homebrew-tools

$ brew install izumin5210/tools/scaffold

Other platforms

Prebuilt binary is available at Releases

Development

# install dependencies
$ make deps

# build
$ make build

# run lint and test
$ make test

License

Licensed under MIT License.