MCPcopy
hub / github.com/perkeep/perkeep / fromHTTP

Method fromHTTP

pkg/search/handler.go:302–307  ·  view source on GitHub ↗

fromHTTP panics with an httputil value on failure

(req *http.Request)

Source from the content-addressed store, hash-verified

300
301// fromHTTP panics with an httputil value on failure
302func (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.
310func (r *RecentRequest) n() int {

Callers 1

serveRecentPermanodesMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected