File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ var RootCmd = &cobra.Command{
3535// This is called by main.main(). It only needs to happen once to the rootCmd.
3636func Execute (version string ) {
3737displayVersion = version
38+ RootCmd .SetHelpTemplate (fmt .Sprintf ("%s\n Version:\n github.com/gesquive/%s\n " ,
39+ RootCmd .HelpTemplate (), displayVersion ))
3840if err := RootCmd .Execute (); err != nil {
3941fmt .Println (err )
4042os .Exit (- 1 )
Original file line number Diff line number Diff line change 11package main
22
3- import "os"
43import "fmt"
5- import "path/filepath"
64import "github.com/gesquive/git-user/cmd"
75
8- var version = "v2.0.3 "
6+ var version = "v2.0.4 "
97var dirty = ""
108
119func main () {
12- displayVersion := fmt .Sprintf ("%s %s%s" ,
13- filepath .Base (os .Args [0 ]),
10+ displayVersion := fmt .Sprintf ("git-user %s%s" ,
1411version ,
1512dirty )
1613cmd .Execute (displayVersion )
You can’t perform that action at this time.
0 commit comments