version command

This commit is contained in:
asoseil 2017-10-23 14:32:42 +02:00
parent 61d9efe90f
commit fd19cc5faf
1 changed files with 12 additions and 2 deletions

View File

@ -14,7 +14,7 @@ import (
)
const (
version = "1.5.0"
version = "1.5.1"
)
// New realize instance
@ -111,7 +111,7 @@ func main() {
{
Name: "init",
Category: "Configuration",
Aliases: []string{"a"},
Aliases: []string{"i"},
Description: "Define a new config file with all options step by step",
Action: func(p *cli.Context) (actErr error) {
interact.Run(&interact.Interact{
@ -1085,6 +1085,16 @@ func main() {
},
Before: before,
},
{
Name: "version",
Aliases: []string{"v"},
Description: "Realize version",
Action: func(p *cli.Context) error {
log.Println(prefix(green.bold(version)))
return nil
},
Before: before,
},
},
}
if err := app.Run(os.Args); err != nil {