()
| 10 | ) |
| 11 | |
| 12 | func main() { |
| 13 | // 首先显示横幅 |
| 14 | ui.PrintBanner() |
| 15 | |
| 16 | // 检查并下载必要的数据文件 |
| 17 | downloader := data.NewDownloader() |
| 18 | if err := downloader.EnsureDataFiles(); err != nil { |
| 19 | fmt.Printf("数据文件检查失败: %v\n", err) |
| 20 | os.Exit(1) |
| 21 | } |
| 22 | |
| 23 | // 创建根命令 |
| 24 | rootCmd, err := cmd.NewRootCmd() |
| 25 | if err != nil { |
| 26 | fmt.Printf("初始化失败: %v\n", err) |
| 27 | os.Exit(1) |
| 28 | } |
| 29 | |
| 30 | // 执行命令 |
| 31 | rootCmd.Execute() |
| 32 | } |
| 33 | |
| 34 |
nothing calls this directly
no test coverage detected