(w http.ResponseWriter, msg string, code int)
| 178 | } |
| 179 | |
| 180 | func writeError(w http.ResponseWriter, msg string, code int) { |
| 181 | w.Header().Set("Content-Type", "application/json") |
| 182 | w.WriteHeader(code) |
| 183 | json.NewEncoder(w).Encode(map[string]any{"message": msg, "code": code}) |
| 184 | } |
no test coverage detected