package cmd import ( "fmt" "github.com/spf13/cobra" ) func init() { rootCmd.AddCommand(versionCmd) } func run(cmd *cobra.Command, args []string) { fmt.Println("0.0.1") } var versionCmd = &cobra.Command{ Use: "version", Short: "Print the version of termshare", Long: "This is the version of the termshare command", Run: func(cmd *cobra.Command, args []string) { fmt.Println("0.0.1") }, }