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

Method URLParamFloat64Default

context/context.go:1678–1685  ·  view source on GitHub ↗

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

(name string, def float64)

Source from the content-addressed store, hash-verified

1676// URLParamFloat64Default returns the url query parameter as float64 value from a request,
1677// if not found or parse failed then "def" is returned.
1678func (ctx *Context) URLParamFloat64Default(name string, def float64) float64 {
1679 v, err := ctx.URLParamFloat64(name)
1680 if err != nil {
1681 return def
1682 }
1683
1684 return v
1685}
1686
1687// URLParamBool returns the url query parameter as boolean value from a request,
1688// returns an error if parse failed.

Callers

nothing calls this directly

Calls 1

URLParamFloat64Method · 0.95

Tested by

no test coverage detected