minor tweaks

This commit is contained in:
A.J. Ruckman
2018-10-20 12:58:39 -04:00
committed by hmage
parent 50d2c0a8d3
commit b3840b5790
4 changed files with 16 additions and 17 deletions

View File

@@ -208,7 +208,7 @@ func HandleQueryLog(w http.ResponseWriter, r *http.Request) {
data = append(data, jsonentry)
}
json, err := json.Marshal(data)
jsonVal, err := json.Marshal(data)
if err != nil {
errortext := fmt.Sprintf("Couldn't marshal data into json: %s", err)
log.Println(errortext)
@@ -217,7 +217,7 @@ func HandleQueryLog(w http.ResponseWriter, r *http.Request) {
}
w.Header().Set("Content-Type", "application/json")
_, err = w.Write(json)
_, err = w.Write(jsonVal)
if err != nil {
errortext := fmt.Sprintf("Unable to write response json: %s", err)
log.Println(errortext)