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

Method PostValueInt16

context/context.go:2108–2115  ·  view source on GitHub ↗

PostValueInt16 returns the last parsed form data matches the given "name" key from POST, PATCH, or PUT body request parameters as int16. See ErrEmptyForm, ErrNotFound and ErrEmptyFormField respectfully.

(name string)

Source from the content-addressed store, hash-verified

2106//
2107// See ErrEmptyForm, ErrNotFound and ErrEmptyFormField respectfully.
2108func (ctx *Context) PostValueInt16(name string) (int16, error) {
2109 value, err := ctx.PostValueString(name)
2110 if err != nil {
2111 return 0, err
2112 }
2113
2114 return strParseInt16(value)
2115}
2116
2117// PostValueInt16Default same as PostValueInt16 but if errored it returns
2118// the given "def" default value.

Callers 1

PostValueInt16DefaultMethod · 0.95

Calls 2

PostValueStringMethod · 0.95
strParseInt16Function · 0.85

Tested by

no test coverage detected