PostValueInt16Default same as PostValueInt16 but if errored it returns the given "def" default value.
(name string, def int16)
| 2117 | // PostValueInt16Default same as PostValueInt16 but if errored it returns |
| 2118 | // the given "def" default value. |
| 2119 | func (ctx *Context) PostValueInt16Default(name string, def int16) int16 { |
| 2120 | value, err := ctx.PostValueInt16(name) |
| 2121 | if err != nil { |
| 2122 | return def |
| 2123 | } |
| 2124 | |
| 2125 | return value |
| 2126 | } |
| 2127 | |
| 2128 | // PostValueInt32 returns the last parsed form data matches the given "name" key |
| 2129 | // from POST, PATCH, or PUT body request parameters as int32. |
nothing calls this directly
no test coverage detected