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

Method PostValueInt64Default

context/context.go:2167–2174  ·  view source on GitHub ↗

PostValueInt64Default same as PostValueInt64 but if errored it returns the given "def" default value.

(name string, def int64)

Source from the content-addressed store, hash-verified

2165// PostValueInt64Default same as PostValueInt64 but if errored it returns
2166// the given "def" default value.
2167func (ctx *Context) PostValueInt64Default(name string, def int64) int64 {
2168 value, err := ctx.PostValueInt64(name)
2169 if err != nil {
2170 return def
2171 }
2172
2173 return value
2174}
2175
2176// PostValueFloat32 returns the last parsed form data matches the given "name" key
2177// from POST, PATCH, or PUT body request parameters as float32.

Callers

nothing calls this directly

Calls 1

PostValueInt64Method · 0.95

Tested by

no test coverage detected