Files
sunhpc-go/internal/cli/init/init.go
2026-02-20 18:44:43 +08:00

20 lines
424 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package initcmd
import (
"github.com/spf13/cobra"
)
// 仅定义 Cmd 注册子命令,只负责组装命令树,尽量不包含业务逻辑
func NewInitCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "init",
Short: "初始化集群配置",
Long: "初始化 SunHPC 配置文件、数据库、系统参数及相关服务",
}
cmd.AddCommand(NewInitDBCmd())
cmd.AddCommand(NewInitCfgCmd())
return cmd
}