Files
TaskPool/cmd/cmd.go
T

20 lines
513 B
Go
Raw Normal View History

2026-02-27 23:08:44 +08:00
package cmd
import (
"github.com/engigu/baihu-panel/cmd/reposync"
"github.com/engigu/baihu-panel/cmd/resetpwd"
2026-02-27 23:51:32 +08:00
"github.com/engigu/baihu-panel/cmd/restore"
2026-03-03 17:25:38 +08:00
// "github.com/engigu/baihu-panel/cmd/migrate"
2026-02-27 23:08:44 +08:00
)
// CommandHandler 定义命令执行函数
type CommandHandler func(args []string)
// Handlers 维护了除了 server 之外的命令的执行入口
var Handlers = map[string]CommandHandler{
"reposync": reposync.Run,
"resetpwd": resetpwd.Run,
2026-02-27 23:51:32 +08:00
"restore": restore.Run,
2026-03-03 17:25:38 +08:00
// "migrate": migrate.Run,
2026-02-27 23:08:44 +08:00
}