(url string, kind entities.Kind, cache camconfig.CacheConfig, data []byte)
| 312 | } |
| 313 | |
| 314 | func saveToCache(url string, kind entities.Kind, cache camconfig.CacheConfig, data []byte) error { |
| 315 | path := cacheFilePath(url, kind, cache) |
| 316 | if err := os.MkdirAll(filepath.Dir(path), 0o755); err != nil { |
| 317 | return err |
| 318 | } |
| 319 | return os.WriteFile(path, data, 0o644) |
| 320 | } |
| 321 | |
| 322 | // ---------- JSON parsing ----------------------------------------------------- |
| 323 |
no test coverage detected