chore: fix golangci-lint errors

This commit is contained in:
Oleg Lobanov
2024-04-01 18:24:06 +02:00
parent d194d71293
commit ae0af1f996
54 changed files with 452 additions and 475 deletions

View File

@@ -2,6 +2,7 @@ package http
import (
"encoding/json"
"errors"
"fmt"
"io/fs"
"log"
@@ -84,7 +85,7 @@ func handleWithStaticData(w http.ResponseWriter, _ *http.Request, d *data, fSys
fileContents, err := fs.ReadFile(fSys, file)
if err != nil {
if err == os.ErrNotExist {
if errors.Is(err, os.ErrNotExist) {
return http.StatusNotFound, err
}
return http.StatusInternalServerError, err