From 1e74e284c06a099b3917e932886da4549faab950 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Mon, 31 Jul 2023 18:13:41 +0200 Subject: ignore staticcheck for deprecated strings.Title function We know the input therefore it is totally save to use strings.Title. --- localBackend.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'localBackend.go') diff --git a/localBackend.go b/localBackend.go index 129be35..8afdda8 100644 --- a/localBackend.go +++ b/localBackend.go @@ -138,7 +138,8 @@ func advancedQuery(patterns map[string]string) string { query_parts := []string{} for _, comp := range []string{"title", "album", "artist"} { if pattern, ok := patterns[comp]; ok { - query_parts = append(query_parts, fmt.Sprintf("%s LIKE '%%%s%%'", strings.Title(comp), pattern)) + titleComp := strings.Title(comp) //nolint:staticcheck + query_parts = append(query_parts, fmt.Sprintf("%s LIKE '%%%s%%'", titleComp, pattern)) } } -- cgit v1.2.3