build: modernize with "go fix -mapsloop": use maps.Copy

This commit is contained in:
Nick Craig-Wood
2026-08-21 12:23:31 +01:00
parent 33e9251b52
commit bfd0e3f3c2
2 changed files with 4 additions and 6 deletions
+2 -3
View File
@@ -8,6 +8,7 @@ import (
"encoding/json"
"errors"
"fmt"
"maps"
"net/http"
"os"
"path"
@@ -1617,9 +1618,7 @@ func (ps *PhotosService) GetLibraryAlbumCounts(ctx context.Context) (map[string]
if err := ps.requestForArea(ctx, area, "internal/records/query/batch", map[string]any{"batch": batch}, &response); err != nil {
return nil, fmt.Errorf("failed to get library album counts: %w", err)
}
for k, v := range response.toCounts(order) {
counts[k] = v
}
maps.Copy(counts, response.toCounts(order))
}
return counts, nil
}