feat: fixed lint errors

This commit is contained in:
2025-11-22 23:52:35 +03:00
parent 80ff5c501d
commit 132945342f
4 changed files with 17 additions and 8 deletions

View File

@@ -39,5 +39,8 @@ func (h *TimeHandler) handleTime(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Content-Type", "application/json")
w.WriteHeader(http.StatusOK)
json.NewEncoder(w).Encode(response)
if err := json.NewEncoder(w).Encode(response); err != nil {
// Handle encoding error - we can't write an error response after headers
return
}
}