21 lines
350 B
Go
21 lines
350 B
Go
package cmd
|
|
|
|
import (
|
|
"fmt"
|
|
|
|
"github.com/spf13/cobra"
|
|
)
|
|
|
|
// versionCmd represents the version command
|
|
var versionCmd = &cobra.Command{
|
|
Use: "version",
|
|
Short: "Prints the current version",
|
|
Long: ``,
|
|
Run: func(cmd *cobra.Command, args []string) {
|
|
fmt.Printf("Version %s\n", AppVersion)
|
|
},
|
|
}
|
|
|
|
func init() {
|
|
rootCmd.AddCommand(versionCmd)
|
|
}
|