(contentType string, body string)
| 124 | } |
| 125 | |
| 126 | func errorResponse418(contentType string, body string) *http.Response { |
| 127 | response := &http.Response{ |
| 128 | Status: "418 I'm a teapot", |
| 129 | StatusCode: 418, |
| 130 | Header: make(http.Header), |
| 131 | Body: ioutil.NopCloser(strings.NewReader(body)), |
| 132 | ContentLength: int64(len(body)), |
| 133 | } |
| 134 | response.Header.Set("Content-Type", contentType) |
| 135 | return response |
| 136 | } |
| 137 | |
| 138 | func errorResponse429(retryAfter string) *http.Response { |
| 139 | body := "" |
no outgoing calls
no test coverage detected