bubblewand/Output/cmd/root.go

28 lines
446 B
Go

package cmd
import (
"fmt"
"os"
"github.com/spf13/cobra"
"specCon18/test-test/tui"
)
var rootCmd = &cobra.Command{
Use: "test-test",
Short: "test-test, A test program generated by bubblewand",
Run: func(cmd *cobra.Command, args []string) {
if err := tui.Run(); err != nil {
fmt.Println("Error:", err)
os.Exit(1)
}
},
}
func Execute() {
cobra.CheckErr(rootCmd.Execute())
}
func init() {
rootCmd.AddCommand(versionCmd)
}