diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2023-07-31 18:13:41 +0200 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2023-07-31 18:14:40 +0200 |
| commit | 1e74e284c06a099b3917e932886da4549faab950 (patch) | |
| tree | 4098ea81f89f828675b53f9ae6594db7a19ac9fe | |
| parent | 103e473f200b76db20ef8d9af3c98db2bfb2aa29 (diff) | |
| download | WRMS-1e74e284c06a099b3917e932886da4549faab950.tar.gz WRMS-1e74e284c06a099b3917e932886da4549faab950.zip | |
ignore staticcheck for deprecated strings.Title function
We know the input therefore it is totally save to use strings.Title.
| -rw-r--r-- | localBackend.go | 3 |
1 files changed, 2 insertions, 1 deletions
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)) } } |
