equal
deleted
inserted
replaced
|
1 // Copyright © 2017 Mikael Berthe <mikael@lilotux.net> |
|
2 // |
|
3 // Licensed under the MIT license. |
|
4 // Please see the LICENSE file is this directory. |
|
5 |
|
6 package cmd |
|
7 |
|
8 import ( |
|
9 "fmt" |
|
10 |
|
11 "github.com/spf13/cobra" |
|
12 ) |
|
13 |
|
14 // VERSION of the madonctl application |
|
15 var VERSION = "0.0.9" |
|
16 |
|
17 var versionCmd = &cobra.Command{ |
|
18 Use: "version", |
|
19 Short: "Display " + AppName + " version", |
|
20 Run: func(cmd *cobra.Command, args []string) { |
|
21 fmt.Printf("This is %s version %s\n", AppName, VERSION) |
|
22 }, |
|
23 } |
|
24 |
|
25 func init() { |
|
26 RootCmd.AddCommand(versionCmd) |
|
27 } |