From 072f1fbc7574c9edf3d2689e58bc76a1c4bd2060 Mon Sep 17 00:00:00 2001 From: ale <ale@incal.net> Date: Mon, 27 Nov 2017 08:45:43 +0000 Subject: [PATCH] Explicitly ignore json.Encode error --- serverutil/json.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/serverutil/json.go b/serverutil/json.go index e1d0f85..b307932 100644 --- a/serverutil/json.go +++ b/serverutil/json.go @@ -33,5 +33,5 @@ func EncodeJSONResponse(w http.ResponseWriter, obj interface{}) { w.Header().Set("Cache-Control", "no-store") w.Header().Set("Expires", "-1") w.Header().Set("X-Content-Type-Options", "nosniff") - json.NewEncoder(w).Encode(obj) + _ = json.NewEncoder(w).Encode(obj) } -- GitLab