forked from toolshed/abra
test: int suite fixes
This commit is contained in:
@ -69,7 +69,7 @@ func ToJSON(headers []string, rows [][]string) (string, error) {
|
||||
|
||||
buff.Write([]byte("["))
|
||||
|
||||
for _, row := range rows {
|
||||
for idx, row := range rows {
|
||||
payload := make(map[string]string)
|
||||
|
||||
for idx, header := range headers {
|
||||
@ -82,6 +82,10 @@ func ToJSON(headers []string, rows [][]string) (string, error) {
|
||||
}
|
||||
|
||||
buff.Write(serialized)
|
||||
|
||||
if idx < (len(rows) - 1) {
|
||||
buff.Write([]byte(","))
|
||||
}
|
||||
}
|
||||
|
||||
buff.Write([]byte("]"))
|
||||
|
Reference in New Issue
Block a user