fix a few bugs that claude pointed out
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
2026-05-12 15:58:45 -04:00
parent a7c5e1708c
commit c45a2e1057
3 changed files with 6 additions and 4 deletions
+2
View File
@@ -100,6 +100,7 @@ func (c *DiscogsCache) loadRecordsFromFS(ctx context.Context) ([]media.Record, t
if err != nil {
return nil, time.Time{}, fmt.Errorf("error opening cache file %s: %w", c.persistFile, err)
}
defer f.Close()
err = gob.NewDecoder(f).Decode(p)
if err != nil {
return nil, time.Time{}, fmt.Errorf("error readhing from cache file %s: %w", c.persistFile, err)
@@ -120,6 +121,7 @@ func (c *DiscogsCache) saveRecordsToCache(ctx context.Context, records []media.R
if err != nil {
return fmt.Errorf("error opening cache file %s: %w", c.persistFile, err)
}
defer f.Close()
err = gob.NewEncoder(f).Encode(p)
if err != nil {
return fmt.Errorf("error writing to cache file %s: %w", c.persistFile, err)