(w http.ResponseWriter, v interface{}, status int)
| 26 | var testFilePath = filepath.Join(os.TempDir(), "test") |
| 27 | |
| 28 | func respondWithJSON(w http.ResponseWriter, v interface{}, status int) { |
| 29 | data, _ := json.Marshal(v) |
| 30 | |
| 31 | w.Header().Set("Content-Type", "application/json") |
| 32 | w.WriteHeader(status) |
| 33 | w.Write(data) |
| 34 | } |
| 35 | |
| 36 | func respondWithData(w http.ResponseWriter, b []byte, status int) { |
| 37 | w.Header().Set("Content-Type", "application/octet-stream") |
no test coverage detected