hertz_scaffold/cmd/cmd.go

35 lines
585 B
Go
Raw Normal View History

2024-08-08 21:29:58 +08:00
package cmd
import (
"github.com/spf13/cobra"
"log"
"os"
)
var (
template = "git@golib-ssh.gaore.com:GaoreGo/hertz_demo.git"
project string
branch = "master"
)
var rootCmd = &cobra.Command{
Use: "hertz_scaffold",
Short: "hertz框架脚手架",
Long: `以golib.gaore.com/GaoreGo/hertz_demo为模板的脚手架`,
Run: func(cmd *cobra.Command, args []string) {
},
}
// Execute 执行命令
func Execute() {
if err := rootCmd.Execute(); err != nil {
log.Println(err)
os.Exit(1)
}
}
func init() {
rootCmd.AddCommand(createCmd)
rootCmd.AddCommand(updateCmd)
}