MCPcopy Create free account
hub / github.com/astercloud/aster / demonstrateStandardPaths

Function demonstrateStandardPaths

examples/config-paths/main.go:30–58  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28}
29
30func 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
60func demonstrateConvenienceMethods() {
61 fmt.Println("\n📋 便捷方法")

Callers 1

mainFunction · 0.85

Calls 6

ConfigDirFunction · 0.92
DataDirFunction · 0.92
CacheDirFunction · 0.92
LogDirFunction · 0.92
PrintfMethod · 0.80
repeatStrFunction · 0.70

Tested by

no test coverage detected