fromHTTP panics with an httputil value on failure
(req *http.Request)
| 300 | |
| 301 | // fromHTTP panics with an httputil value on failure |
| 302 | func (r *RecentRequest) fromHTTP(req *http.Request) { |
| 303 | r.N, _ = strconv.Atoi(req.FormValue("n")) |
| 304 | if before := req.FormValue("before"); before != "" { |
| 305 | r.Before = time.Time(types.ParseTime3339OrZero(before)) |
| 306 | } |
| 307 | } |
| 308 | |
| 309 | // n returns the sanitized maximum number of search results. |
| 310 | func (r *RecentRequest) n() int { |
no outgoing calls
no test coverage detected