MCPcopy Create free account
hub / github.com/devfeel/dotweb / QueryInt64

Method QueryInt64

context.go:395–405  ·  view source on GitHub ↗

QueryInt64 get query key with int64 format if not exists or not int64 type, return 0

(key string)

Source from the content-addressed store, hash-verified

393// QueryInt64 get query key with int64 format
394// if not exists or not int64 type, return 0
395func (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.

Callers

nothing calls this directly

Calls 1

QueryStringMethod · 0.65

Tested by

no test coverage detected