mirror of
https://github.com/foomo/posh.git
synced 2025-10-16 12:45:38 +00:00
24 lines
457 B
Go
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)
|
|
}
|