lint(handlers): Use strings.EqualFold for case-insensitive comparison
Fix SA6005 staticcheck warning in OPDS handler
This commit is contained in:
@@ -106,7 +106,7 @@ func (h *OPDSHandler) GetDeviceCatalog(c echo.Context) error {
|
|||||||
if includeFormat != "" {
|
if includeFormat != "" {
|
||||||
filteredItems := []database.ListMediaItemsByLibraryRow{}
|
filteredItems := []database.ListMediaItemsByLibraryRow{}
|
||||||
for _, item := range allItems {
|
for _, item := range allItems {
|
||||||
if strings.ToLower(item.FormatGroup) == strings.ToLower(includeFormat) {
|
if strings.EqualFold(item.FormatGroup, includeFormat) {
|
||||||
filteredItems = append(filteredItems, item)
|
filteredItems = append(filteredItems, item)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user