(w http.ResponseWriter, status int, v any)
| 166 | } |
| 167 | |
| 168 | func writeJSON(w http.ResponseWriter, status int, v any) { |
| 169 | w.Header().Set("Content-Type", "application/json; charset=utf-8") |
| 170 | w.WriteHeader(status) |
| 171 | _ = json.NewEncoder(w).Encode(v) |
| 172 | } |
| 173 | |
| 174 | func writeError(w http.ResponseWriter, id int64, code int, msg string, err error) { |
| 175 | m := msg |
no test coverage detected