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

Method URLParamBool

context/context.go:1689–1691  ·  view source on GitHub ↗

URLParamBool returns the url query parameter as boolean value from a request, returns an error if parse failed.

(name string)

Source from the content-addressed store, hash-verified

1687// URLParamBool returns the url query parameter as boolean value from a request,
1688// returns an error if parse failed.
1689func (ctx *Context) URLParamBool(name string) (bool, error) {
1690 return strconv.ParseBool(ctx.URLParam(name))
1691}
1692
1693// URLParamBoolDefault returns the url query parameter as boolean value from a request,
1694// if not found or parse failed then "def" is returned.

Callers 3

URLParamBoolDefaultMethod · 0.95
newAppFunction · 0.80
TestSwitchJoinFunction · 0.80

Calls 1

URLParamMethod · 0.95

Tested by 1

TestSwitchJoinFunction · 0.64