Add csv header to response

This commit is contained in:
Dan Sosedoff 2014-10-10 20:41:15 -05:00
parent 10b1429d92
commit 1b152c80a0

View File

@ -115,6 +115,8 @@ func (res *Result) CSV() string {
buff := &bytes.Buffer{}
writer := csv.NewWriter(buff)
writer.Write(res.Columns)
for _, row := range res.Rows {
record := make([]string, len(res.Columns))