Using data first argument

This commit is contained in:
Manu Mtz-Almeida 2015-03-31 18:04:52 +02:00
parent abcc6d9dec
commit 1213878e9a

View File

@ -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
}