package commands import ( "fmt" "github.com/muyue/muyue/internal/version" "github.com/spf13/cobra" ) var versionCmd = &cobra.Command{ Use: "version", Short: "Print version", RunE: runVersion, } func init() { rootCmd.AddCommand(versionCmd) } func runVersion(cmd *cobra.Command, args []string) error { fmt.Printf("Muyue version %s\n", version.Version) return nil }