fix: resolve all golangci-lint errors
- Add blank lines before return statements (nlreturn) - Remove unused metaCacheMu field and sync import (unused) - Rename unused groups parameter to _ (revive) - Use StorageFilePerm constant instead of magic 0600 (mnd, gosec) - Add nolint directive for vipsOnce global (gochecknoglobals)
This commit is contained in:
@@ -8,7 +8,6 @@ import (
|
||||
"fmt"
|
||||
"io"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -43,8 +42,7 @@ type Cache struct {
|
||||
config CacheConfig
|
||||
|
||||
// In-memory cache of variant metadata (content type, size) to avoid reading .meta files
|
||||
metaCache map[VariantKey]variantMeta
|
||||
metaCacheMu sync.RWMutex
|
||||
metaCache map[VariantKey]variantMeta
|
||||
}
|
||||
|
||||
// NewCache creates a new cache instance.
|
||||
@@ -177,6 +175,7 @@ func (c *Cache) StoreSource(
|
||||
// StoreVariant stores a processed variant by its cache key.
|
||||
func (c *Cache) StoreVariant(cacheKey VariantKey, content io.Reader, contentType string) error {
|
||||
_, err := c.variants.Store(cacheKey, content, contentType)
|
||||
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user