重构架构

This commit is contained in:
2026-02-20 18:44:43 +08:00
parent aba7b68439
commit cc71248ef4
52 changed files with 1404 additions and 2360 deletions

17
internal/cli/tmpl/init.go Normal file
View File

@@ -0,0 +1,17 @@
// cmd/tmpl/init.go
package tmpl
import "github.com/spf13/cobra"
// Cmd 是 sunhpc tmpl 的根命令
func NewTmplCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "tmpl",
Short: "管理配置模板",
Long: "从 YAML 模板生成配置文件或脚本,支持变量替换和多阶段执行",
}
cmd.AddCommand(newRenderCmd())
cmd.AddCommand(newDumpCmd())
return cmd
}