posh/cmd/version.go
Kevin Franklin Kim e2ad376b6c initial commit
2023-01-03 15:37:15 +01:00

24 lines
457 B
Go

package cmd
import (
"fmt"
"github.com/spf13/cobra"
)
const Version = "develop"
// versionCmd represents the version command
var versionCmd = &cobra.Command{
Use: "version",
Short: "Print the version",
Long: `If unsure which version of the CLI you are using, you can use this command to print the version of the CLI.`,
Run: func(cmd *cobra.Command, args []string) {
fmt.Println(Version)
},
}
func init() {
rootCmd.AddCommand(versionCmd)
}