doc: improve readme.

This commit is contained in:
Fernandez Ludovic
2019-09-17 00:39:02 +02:00
parent 510476dca9
commit d8aeedd011
2 changed files with 22 additions and 0 deletions

1
app.go
View File

@ -211,6 +211,7 @@ func apiHandler(w http.ResponseWriter, req *http.Request) {
}
}
w.Header().Set("Content-Type", "application/json")
if err := json.NewEncoder(w).Encode(data); err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return