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

Method URLParamExists

context/context.go:1501–1504  ·  view source on GitHub ↗

URLParamExists returns true if the url parameter exists, otherwise false.

(name string)

Source from the content-addressed store, hash-verified

1499
1500// URLParamExists returns true if the url parameter exists, otherwise false.
1501func (ctx *Context) URLParamExists(name string) bool {
1502 _, exists := ctx.getQuery()[name]
1503 return exists
1504}
1505
1506// URLParamDefault returns the get parameter from a request, if not found then "def" is returned.
1507func (ctx *Context) URLParamDefault(name string, def string) string {

Callers 4

SetupErrorHandlersMethod · 0.80
GetCustomStructWithErrorFunction · 0.80
GetJsonMethod · 0.80

Calls 1

getQueryMethod · 0.95

Tested by 3

GetCustomStructWithErrorFunction · 0.64
GetJsonMethod · 0.64