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

Method PostValueFloat64Default

context/context.go:2215–2222  ·  view source on GitHub ↗

PostValueFloat64Default same as PostValueFloat64 but if errored it returns the given "def" default value.

(name string, def float64)

Source from the content-addressed store, hash-verified

2213// PostValueFloat64Default same as PostValueFloat64 but if errored it returns
2214// the given "def" default value.
2215func (ctx *Context) PostValueFloat64Default(name string, def float64) float64 {
2216 value, err := ctx.PostValueFloat64(name)
2217 if err != nil {
2218 return def
2219 }
2220
2221 return value
2222}
2223
2224// PostValueComplex64 returns the last parsed form data matches the given "name" key
2225// from POST, PATCH, or PUT body request parameters as complex64.

Callers

nothing calls this directly

Calls 1

PostValueFloat64Method · 0.95

Tested by

no test coverage detected