From 657db029b2fc4fc7d267fdc636999debde8e782d Mon Sep 17 00:00:00 2001 From: gitforbit <44337839+gitforbit@users.noreply.github.com> Date: Wed, 24 Jun 2020 14:29:21 +0200 Subject: [PATCH] agent-http: cleanup: return nil instead of err (#8043) Since err is already checked, it should return `nil` --- agent/http.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/agent/http.go b/agent/http.go index 222d18e73b..de9c6cb538 100644 --- a/agent/http.go +++ b/agent/http.go @@ -599,7 +599,7 @@ func (s *HTTPServer) marshalJSON(req *http.Request, obj interface{}) ([]byte, er if err != nil { return nil, err } - return buf, err + return buf, nil } // Returns true if the UI is enabled.