Skip to content

Commit

Permalink
feat(cmd/version): Add alias "v" (example usage of aliases)
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrejsika committed Aug 3, 2021
1 parent 503e6de commit a33954c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmd/version/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,10 @@ import (
)

var VersionCmd = &cobra.Command{
Use: "version",
Short: "Prints version",
Args: cobra.NoArgs,
Use: "version",
Short: "Prints version",
Aliases: []string{"v"},
Args: cobra.NoArgs,
Run: func(c *cobra.Command, args []string) {
fmt.Printf("%s\n", version.Version)
},
Expand Down

0 comments on commit a33954c

Please sign in to comment.