(w http.ResponseWriter, status int, message string)
| 27 | } |
| 28 | |
| 29 | func writeAPIError(w http.ResponseWriter, status int, message string) { |
| 30 | writeJSON(w, status, APIResponse[struct{}]{ |
| 31 | Success: false, |
| 32 | Error: message, |
| 33 | }) |
| 34 | } |
| 35 | |
| 36 | // RunInTestMode wraps a handler so that when the request carries |
| 37 | // "X-Test-Mode: true", the current config overrides are snapshotted before |
no test coverage detected