1
0
mirror of https://github.com/kataras/iris.git synced 2025-12-21 03:47:04 +00:00
Files
kararas_iris/iris/main.go
Gerasimos (Makis) Maropoulos 244a59e055 20 days of unstoppable work. Waiting fo go 1.8, I didn't finish yet, some touches remains.
Former-commit-id: ed84f99c89f43fe5e980a8e6d0ee22c186f0e1b9
2017-02-14 05:54:11 +02:00

34 lines
672 B
Go

package main
import (
"github.com/kataras/cli"
"gopkg.in/kataras/iris.v6"
)
var (
// Name the name of the cmd tool
Name = "Iris Command Line Tool"
app *cli.App
)
func init() {
// init the cli app
app = cli.NewApp("iris", "Command line tool for Iris web framework", iris.Version)
// version command
app.Command(cli.Command("version", "\t prints your iris version").
Action(func(cli.Flags) error { app.Printf("%s", app.Version); return nil }))
// run command/-/run.go
// register the commands
app.Command(buildGetCommand())
app.Command(buildRunCommand())
}
func main() {
// run the application
app.Run(func(cli.Flags) error {
return nil
})
}