(w http.ResponseWriter, r *http.Request)
| 28 | } |
| 29 | |
| 30 | func cleverHandle(w http.ResponseWriter, r *http.Request) error { |
| 31 | _, matched, err := ProcessRequestFirstMatchOf(r, [][]string{ |
| 32 | {"compliment"}, |
| 33 | {"critique"}, |
| 34 | }) |
| 35 | if err != nil { |
| 36 | return err |
| 37 | } |
| 38 | if matched[0] == "critique" { |
| 39 | return SendResponse(w, deny) |
| 40 | } |
| 41 | |
| 42 | return SendResponse(w, ty) |
| 43 | } |
| 44 | |
| 45 | func post(t *testing.T, obj map[string]interface{}, ts *httptest.Server) (resp *http.Response, body []byte) { |
| 46 | blob, err := json.Marshal(obj) |
nothing calls this directly
no test coverage detected
searching dependent graphs…