MCPcopy Create free account
hub / github.com/kataras/iris / URLParamInt64Default

Method URLParamInt64Default

context/context.go:1639–1646  ·  view source on GitHub ↗

URLParamInt64Default returns the url query parameter as int64 value from a request, if not found or parse failed then "def" is returned.

(name string, def int64)

Source from the content-addressed store, hash-verified

1637// URLParamInt64Default returns the url query parameter as int64 value from a request,
1638// if not found or parse failed then "def" is returned.
1639func (ctx *Context) URLParamInt64Default(name string, def int64) int64 {
1640 v, err := ctx.URLParamInt64(name)
1641 if err != nil {
1642 return def
1643 }
1644
1645 return v
1646}
1647
1648// URLParamUint64 returns the url query parameter as uint64 value from a request.
1649// Returns 0 on parse errors or when the URL parameter does not exist in the Query.

Callers 1

Calls 1

URLParamInt64Method · 0.95

Tested by

no test coverage detected