Skip to content
/ cmdr-go-starter Public template

a github template project to make new app based cmdr fastly and easily

License

Notifications You must be signed in to change notification settings

hedzr/cmdr-go-starter

Repository files navigation

cmdr-go-starter

Go

A template repository to build your first Golang Open Source app based cmdr.

powered by cmdr v1.11+.

fast guide:

  1. All you have to do is click the Use this template button upon this page.
  2. run! (go run ./cli/app/cli/app/main.go)

with command-line:

new repo

  1. clone cmdr-go-starter as a template

    # clone cmdr-go-starter as a template
    git clone https://github.com/hedzr/cmdr-go-starter.git new-repo
    cd new-repo
    git push [email protected]:yourname/new-repo.git +master:master
  2. clone the new-repo to your working directory:

    # in the working directory of your new-repo
    cd ~/work
    git clone [email protected]:yourname/new-repo.git
    cd new-repo
  3. do rename stuffs ...

Getting Started (For the generated golang project)

To run the CLI app:

# go install -v github.com/swaggo/swag/cmd/swag
go generate ./...               # run it once at least, for gen the swagger-doc files from skeletons
go run ./cli/your-app/main.go   # build the CLI app

Status

  • cmdr v1.11.26+

LICENSE

Apache 2.0