(w http.ResponseWriter, value any)
| 468 | } |
| 469 | |
| 470 | func writeJSON(w http.ResponseWriter, value any) { |
| 471 | w.Header().Set("Content-Type", "application/json") |
| 472 | _ = json.NewEncoder(w).Encode(value) |
| 473 | } |
| 474 | |
| 475 | // writeJSONStatus writes value as JSON with an explicit status code. |
| 476 | func writeJSONStatus(w http.ResponseWriter, status int, value any) { |
no test coverage detected