lint: fix errcheck for fmt.Fprintf/Fprint across multiple files

Add lint.Fprint helper for unchecked fmt.Fprint calls.
Use lint.Fprintf/Fprint in api/event.go, api/image.go, rmo/root.go.
Add explicit error check for fmt.Fprintf in middleware/terminal.go cW.
This commit is contained in:
Eli Ribble 2026-05-09 02:21:53 +00:00
parent 934fb03ca2
commit c7a7e8431c
No known key found for this signature in database
5 changed files with 20 additions and 8 deletions

View file

@ -1,11 +1,11 @@
package rmo
import (
"fmt"
"net/http"
"github.com/Gleipnir-Technology/nidus-sync/config"
"github.com/Gleipnir-Technology/nidus-sync/db/models"
"github.com/Gleipnir-Technology/nidus-sync/lint"
"github.com/Gleipnir-Technology/nidus-sync/html"
"github.com/rs/zerolog/log"
)
@ -76,8 +76,8 @@ func getRootDistrict(w http.ResponseWriter, r *http.Request) {
}
func getRobots(w http.ResponseWriter, r *http.Request) {
fmt.Fprint(w, "User-agent: *\n")
fmt.Fprint(w, "Allow: /\n")
lint.Fprint(w, "User-agent: *\n")
lint.Fprint(w, "Allow: /\n")
}
func getTerms(w http.ResponseWriter, r *http.Request) {
html.RenderOrError(