()
| 13 | ) |
| 14 | |
| 15 | func main() { |
| 16 | fmt.Println("📖 Recipe System 示例") |
| 17 | fmt.Println("================================") |
| 18 | |
| 19 | // 创建临时目录 |
| 20 | tmpDir, err := os.MkdirTemp("", "aster-recipe-demo") |
| 21 | if err != nil { |
| 22 | log.Fatalf("创建临时目录失败: %v", err) |
| 23 | } |
| 24 | defer func() { _ = os.RemoveAll(tmpDir) }() |
| 25 | |
| 26 | // 演示各种 Recipe 功能 |
| 27 | demonstrateBasicRecipe(tmpDir) |
| 28 | demonstrateBuilderPattern() |
| 29 | demonstrateMCPExtensions(tmpDir) |
| 30 | demonstrateParameters(tmpDir) |
| 31 | demonstratePermissions(tmpDir) |
| 32 | |
| 33 | fmt.Println("\n✅ Recipe System 示例完成!") |
| 34 | } |
| 35 | |
| 36 | // 演示基础 Recipe |
| 37 | func demonstrateBasicRecipe(tmpDir string) { |
nothing calls this directly
no test coverage detected