From 1213878e9a26fa187141cc9b1ea3775531f1b356 Mon Sep 17 00:00:00 2001 From: Manu Mtz-Almeida Date: Tue, 31 Mar 2015 18:04:52 +0200 Subject: [PATCH] Using data first argument --- render/render.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/render/render.go b/render/render.go index 6058483d..90d54971 100644 --- a/render/render.go +++ b/render/render.go @@ -56,7 +56,7 @@ func (_ jsonRender) Render(w http.ResponseWriter, code int, data ...interface{}) func (_ indentedJSON) Render(w http.ResponseWriter, code int, data ...interface{}) error { WriteHeader(w, code, "application/json") - jsonData, err := json.MarshalIndent(data, "", " ") + jsonData, err := json.MarshalIndent(data[0], "", " ") if err != nil { return err }