(key string)
| 375 | } |
| 376 | |
| 377 | func (c *ToolCache) deleteFromFile(key string) error { |
| 378 | filePath := c.getCacheFilePath(key) |
| 379 | if err := os.Remove(filePath); err != nil && !os.IsNotExist(err) { |
| 380 | return fmt.Errorf("failed to delete cache file: %w", err) |
| 381 | } |
| 382 | return nil |
| 383 | } |
| 384 | |
| 385 | func (c *ToolCache) getCacheFilePath(key string) string { |
| 386 | return filepath.Join(c.config.CacheDir, key+".json") |
no test coverage detected