From c7e58f08286f59196307db871696c065557f4801 Mon Sep 17 00:00:00 2001 From: Dan Sosedoff Date: Mon, 4 Jan 2016 18:35:05 -0600 Subject: [PATCH] Remove duplicate code --- pkg/client/result.go | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/pkg/client/result.go b/pkg/client/result.go index 893228f..fcda930 100644 --- a/pkg/client/result.go +++ b/pkg/client/result.go @@ -60,16 +60,6 @@ func (res *Result) CSV() []byte { } func (res *Result) JSON() []byte { - records := []map[string]interface{}{} - - for _, row := range res.Rows { - record := map[string]interface{}{} - for i, col := range res.Columns { - record[col] = row[i] - } - records = append(records, record) - } - - data, _ := json.Marshal(records) + data, _ := json.Marshal(res.Format()) return data }