File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Original file line number Diff line number Diff line change @@ -24,21 +24,17 @@ package cmd
24
24
import (
25
25
"fmt"
26
26
27
+ "github.com/ks6088ts/template-go/internal"
27
28
"github.com/spf13/cobra"
28
29
)
29
30
30
31
// versionCmd represents the version command
31
32
var versionCmd = & cobra.Command {
32
33
Use : "version" ,
33
- Short : "A brief description of your command" ,
34
- Long : `A longer description that spans multiple lines and likely contains examples
35
- and usage of using your command. For example:
36
-
37
- Cobra is a CLI library for Go that empowers applications.
38
- This application is a tool to generate the needed files
39
- to quickly create a Cobra application.` ,
34
+ Short : "Version command" ,
35
+ Long : `Version command is a command to show the version of the application.` ,
40
36
Run : func (cmd * cobra.Command , args []string ) {
41
- fmt .Println ("version called" )
37
+ fmt .Printf ("version=%s, revision=%s \n " , internal . Version , internal . Revision )
42
38
},
43
39
}
44
40
You can’t perform that action at this time.
0 commit comments