Skip to content

Commit 62038bd

Browse files
authored
Merge pull request #6 from guggero/json-single-line
main: don't pretty-print JSON
2 parents ccec6ca + 9df56d6 commit 62038bd

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

main.go

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
package main
22

33
import (
4-
"bytes"
54
"encoding/json"
65
"fmt"
76
"io/ioutil"
@@ -135,11 +134,7 @@ func asJSON(resp interface{}) (string, error) {
135134
return "", err
136135
}
137136

138-
var out bytes.Buffer
139-
_ = json.Indent(&out, b, "", "\t")
140-
out.WriteString("\n")
141-
142-
return out.String(), nil
137+
return string(b), nil
143138
}
144139

145140
func readFile(fileName string) (string, error) {

0 commit comments

Comments
 (0)