()
| 1348 | } |
| 1349 | |
| 1350 | func DefaultCacheDir() string { |
| 1351 | defaultCacheDir, err := os.UserCacheDir() |
| 1352 | if err != nil { |
| 1353 | defaultCacheDir = os.TempDir() |
| 1354 | } |
| 1355 | if dir := os.Getenv("CACHE_DIRECTORY"); dir != "" { |
| 1356 | // For compatibility with systemd. |
| 1357 | defaultCacheDir = dir |
| 1358 | } |
| 1359 | if dir := os.Getenv("CLIDOCGEN_CACHE_DIRECTORY"); dir != "" { |
| 1360 | defaultCacheDir = dir |
| 1361 | } |
| 1362 | return filepath.Join(defaultCacheDir, "coder") |
| 1363 | } |
| 1364 | |
| 1365 | func DefaultSupportLinks(docsURL string) []LinkConfig { |
| 1366 | version := buildinfo.Version() |
no test coverage detected