fix: resolve all golangci-lint errors and integrate linter into CI/CD, Makefile, and check script
This commit is contained in:
@@ -345,7 +345,9 @@ func (h *Handler) ImportOPML(w http.ResponseWriter, r *http.Request) {
|
||||
h.writeError(w, http.StatusBadRequest, "file field is required")
|
||||
return
|
||||
}
|
||||
defer file.Close()
|
||||
defer func() {
|
||||
_ = file.Close()
|
||||
}()
|
||||
|
||||
data, err := io.ReadAll(file)
|
||||
if err != nil {
|
||||
@@ -524,7 +526,3 @@ func (h *Handler) ViewSharedEntry(w http.ResponseWriter, r *http.Request) {
|
||||
w.Header().Set("Content-Type", "text/html; charset=utf-8")
|
||||
_, _ = w.Write([]byte(html))
|
||||
}
|
||||
|
||||
type sqlNullHelper struct {
|
||||
String string
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user