(w http.ResponseWriter, status int, data any)
| 6 | ) |
| 7 | |
| 8 | func writeJSON(w http.ResponseWriter, status int, data any) error { |
| 9 | w.Header().Set("Content-Type", "application/json") |
| 10 | w.WriteHeader(status) |
| 11 | return json.NewEncoder(w).Encode(data) |
| 12 | } |
no test coverage detected