feat(ci): update golangci-lint and action (#325)

* Update linter

- Update Github golangci-lint-action to v3
- Update golangci-lint to v1.52.2

* Fix linter issues after updating to linter 1.52.2
This commit is contained in:
Gregor Zurowski
2023-05-19 14:05:14 +02:00
committed by GitHub
parent ab07b876b8
commit 85eeb860bf
15 changed files with 43 additions and 62 deletions

View File

@@ -78,22 +78,6 @@ func makeHTTPMockWithAdmin(query url.Values) (*httptest.ResponseRecorder, *http.
return rr, req
}
func serveRaw(t *testing.T, contr *Controller, h handlerSubsonicRaw, rr *httptest.ResponseRecorder, req *http.Request) {
type middleware func(http.Handler) http.Handler
middlewares := []middleware{
contr.WithParams,
contr.WithRequiredParams,
contr.WithUser,
}
handler := contr.HR(h)
for _, m := range middlewares {
handler = m(handler)
}
handler.ServeHTTP(rr, req)
}
func runQueryCases(t *testing.T, contr *Controller, h handlerSubsonic, cases []*queryCase) {
t.Helper()
for _, qc := range cases {