summary refs log tree commit diff stats
path: root/query.go
diff options
context:
space:
mode:
Diffstat (limited to 'query.go')
-rw-r--r--query.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/query.go b/query.go
index e74e109..6b9792b 100644
--- a/query.go
+++ b/query.go
@@ -24,10 +24,10 @@ func apiErrCheck(err error, r *http.Request) {
 func parseQueryOut(out []string) []byte {
 	var data []byte
 
-	for _, e := range out {
+	for i, e := range out {
 		data = append(data, []byte(e)...)
 
-		if !strings.HasSuffix(e, "\n") {
+		if !strings.HasSuffix(e, "\n") && i != len(out)-1 {
 			data = append(data, byte('\n'))
 		}
 	}