diff --git a/cmd/version.go b/cmd/version.go index a1a0a71..9652eb5 100644 --- a/cmd/version.go +++ b/cmd/version.go @@ -1,7 +1,22 @@ package cmd import ( + "fmt" "pigeon/pigeon" + + "github.com/spf13/cobra" ) -const x = pigeon.Version +var versionCmd = &cobra.Command{ + Use: "version", + Short: "Show the version of the Pigeon CLI tool.", + Long: ``, + Run: func(cmd *cobra.Command, args []string) { + result := fmt.Sprintf("Pigeon v%s", pigeon.Version) + fmt.Println(result) + }, +} + +func init() { + rootCmd.AddCommand(versionCmd) +} diff --git a/hmm b/hmm new file mode 100755 index 0000000..6464595 Binary files /dev/null and b/hmm differ