fix: check error return value in ExportPDF handler

- Add proper error handling for w.Write() call in ExportPDF function
- Fixes golangci-lint errcheck issue at cv.go:285
- Log error if response write fails
This commit is contained in:
juanatsap
2025-11-10 17:26:05 +00:00
parent a5d369625c
commit 73b402173c
+3 -1
View File
@@ -282,7 +282,9 @@ func (h *CVHandler) ExportPDF(w http.ResponseWriter, r *http.Request) {
</body>
</html>`, lang, message, lang, message, body, redirectMsg)
w.Write([]byte(html))
if _, err := w.Write([]byte(html)); err != nil {
log.Printf("Error writing response: %v", err)
}
}
// splitSkills splits skill categories between left (page 1) and right (page 2) sidebars