Set a correct content type header for CSV endpoint

This commit is contained in:
Dan Sosedoff
2014-10-18 08:15:13 -07:00
parent f955131728
commit bf2df4e74f
2 changed files with 3 additions and 3 deletions

View File

@@ -163,7 +163,7 @@ func (res *Result) Format() []map[string]interface{} {
return items
}
func (res *Result) CSV() string {
func (res *Result) CSV() []byte {
buff := &bytes.Buffer{}
writer := csv.NewWriter(buff)
@@ -189,5 +189,5 @@ func (res *Result) CSV() string {
}
writer.Flush()
return buff.String()
return buff.Bytes()
}