| 28 | } |
| 29 | |
| 30 | func demonstrateStandardPaths() { |
| 31 | fmt.Println("\n📋 标准应用路径") |
| 32 | fmt.Println(repeatStr("-", 50)) |
| 33 | |
| 34 | fmt.Println(" 当前平台路径:") |
| 35 | fmt.Printf(" 配置目录: %s\n", config.ConfigDir()) |
| 36 | fmt.Printf(" 数据目录: %s\n", config.DataDir()) |
| 37 | fmt.Printf(" 缓存目录: %s\n", config.CacheDir()) |
| 38 | fmt.Printf(" 日志目录: %s\n", config.LogDir()) |
| 39 | |
| 40 | fmt.Println("\n 平台路径约定:") |
| 41 | fmt.Println(" macOS:") |
| 42 | fmt.Println(" 配置: ~/Library/Application Support/Aster/") |
| 43 | fmt.Println(" 数据: ~/Library/Application Support/Aster/") |
| 44 | fmt.Println(" 缓存: ~/Library/Caches/Aster/") |
| 45 | fmt.Println(" 日志: ~/Library/Logs/Aster/") |
| 46 | fmt.Println() |
| 47 | fmt.Println(" Linux:") |
| 48 | fmt.Println(" 配置: ~/.config/aster/") |
| 49 | fmt.Println(" 数据: ~/.local/share/aster/") |
| 50 | fmt.Println(" 缓存: ~/.cache/aster/") |
| 51 | fmt.Println(" 日志: ~/.local/state/aster/logs/") |
| 52 | fmt.Println() |
| 53 | fmt.Println(" Windows:") |
| 54 | fmt.Println(" 配置: %APPDATA%\\Aster\\") |
| 55 | fmt.Println(" 数据: %APPDATA%\\Aster\\data\\") |
| 56 | fmt.Println(" 缓存: %LOCALAPPDATA%\\Aster\\cache\\") |
| 57 | fmt.Println(" 日志: %LOCALAPPDATA%\\Aster\\logs\\") |
| 58 | } |
| 59 | |
| 60 | func demonstrateConvenienceMethods() { |
| 61 | fmt.Println("\n📋 便捷方法") |