feat: add cmd task call

This commit is contained in:
duorameng
2026-05-13 17:17:50 +08:00
parent da2b003b83
commit f498c4fcd5
13 changed files with 619 additions and 58 deletions
+9 -2
View File
@@ -42,10 +42,17 @@ func InitBasic() *App {
return app
}
func (a *App) initConfig() {
a.initConfigWithPath(constant.ConfigPath)
// InitBasicForCmd 专为命令行工具定制的基础环境初始化入口
// 内部会调高控制台日志过滤级别以自动静默屏蔽刷屏的底层系统与组件启动 Info 日志
func InitBasicForCmd() *App {
logger.SetLevel("warn")
return InitBasic()
}
// func (a *App) initConfig() {
// a.initConfigWithPath(constant.ConfigPath)
// }
func (a *App) initConfigWithPath(path string) {
cfg, err := services.LoadConfig(path)
if err != nil {