Add golangci linters

- Remove unnecessary type conversion.
- Fix gocritic checks.
This commit is contained in:
Gusted 2022-11-15 09:04:56 +01:00
parent df5199c9a3
commit 827c582147
No known key found for this signature in database
GPG key ID: FD821B732837125F
7 changed files with 40 additions and 21 deletions

View file

@ -42,10 +42,7 @@ func (f FileResponse) IsEmpty() bool {
return len(f.Body) != 0
}
func (f FileResponse) createHttpResponse(cacheKey string) (http.Header, int) {
header := make(http.Header)
var statusCode int
func (f FileResponse) createHttpResponse(cacheKey string) (header http.Header, statusCode int) {
if f.Exists {
statusCode = http.StatusOK
} else {