QueryInt64 get query key with int64 format if not exists or not int64 type, return 0
(key string)
| 393 | // QueryInt64 get query key with int64 format |
| 394 | // if not exists or not int64 type, return 0 |
| 395 | func (ctx *HttpContext) QueryInt64(key string) int64 { |
| 396 | param := ctx.request.QueryString(key) |
| 397 | if param == "" { |
| 398 | return 0 |
| 399 | } |
| 400 | val, err := strconv.ParseInt(param, 10, 64) |
| 401 | if err != nil { |
| 402 | return 0 |
| 403 | } |
| 404 | return val |
| 405 | } |
| 406 | |
| 407 | // FormValue returns the first value for the named component of the query. |
| 408 | // POST and PUT body parameters take precedence over URL query string values. |
nothing calls this directly
no test coverage detected