MustGetBlobRef returns a non-nil BlobRef from req, as given by param. If it doesn't, it panics with a value understood by Recover or RecoverJSON.
(req *http.Request, param string)
| 232 | // MustGetBlobRef returns a non-nil BlobRef from req, as given by param. |
| 233 | // If it doesn't, it panics with a value understood by Recover or RecoverJSON. |
| 234 | func MustGetBlobRef(req *http.Request, param string) blob.Ref { |
| 235 | br, ok := blob.Parse(MustGet(req, param)) |
| 236 | if !ok { |
| 237 | panic(InvalidParameterError(param)) |
| 238 | } |
| 239 | return br |
| 240 | } |
| 241 | |
| 242 | // OptionalInt returns the integer in req given by param, or 0 if not present. |
| 243 | // If the form value is not an integer, it panics with a a value understood by Recover or RecoverJSON. |
no test coverage detected