diff --git a/cmd/version.go b/cmd/version.go new file mode 100644 index 0000000..3081b7e --- /dev/null +++ b/cmd/version.go @@ -0,0 +1,21 @@ +package cmd + +import ( + "fmt" + + "github.com/spf13/cobra" +) + +var version = "master" + +var versionCmd = &cobra.Command{ + Use: "version", + Short: "Print the version number of Tychus", + Run: func(cmd *cobra.Command, args []string) { + fmt.Printf("Tychus Version: %v\n", version) + }, +} + +func init() { + rootCmd.AddCommand(versionCmd) +}