PostValueFloat32 returns the last parsed form data matches the given "name" key from POST, PATCH, or PUT body request parameters as float32. See ErrEmptyForm, ErrNotFound and ErrEmptyFormField respectfully.
(name string)
| 2178 | // |
| 2179 | // See ErrEmptyForm, ErrNotFound and ErrEmptyFormField respectfully. |
| 2180 | func (ctx *Context) PostValueFloat32(name string) (float32, error) { |
| 2181 | value, err := ctx.PostValueString(name) |
| 2182 | if err != nil { |
| 2183 | return 0, err |
| 2184 | } |
| 2185 | |
| 2186 | return strParseFloat32(value) |
| 2187 | } |
| 2188 | |
| 2189 | // PostValueFloat32Default same as PostValueFloat32 but if errored it returns |
| 2190 | // the given "def" default value. |
no test coverage detected