(w http.ResponseWriter, status int, v interface{})
| 344 | } |
| 345 | |
| 346 | func writeJSON(w http.ResponseWriter, status int, v interface{}) { |
| 347 | w.Header().Set("Content-Type", "application/json") |
| 348 | w.WriteHeader(status) |
| 349 | json.NewEncoder(w).Encode(v) |
| 350 | } |
| 351 | |
| 352 | func writeJSONError(w http.ResponseWriter, status int, message string, details interface{}) { |
| 353 | w.Header().Set("Content-Type", "application/json") |
no test coverage detected