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

Method PostValueInt8

context/context.go:2084–2091  ·  view source on GitHub ↗

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

(name string)

Source from the content-addressed store, hash-verified

2082//
2083// See ErrEmptyForm, ErrNotFound and ErrEmptyFormField respectfully.
2084func (ctx *Context) PostValueInt8(name string) (int8, error) {
2085 value, err := ctx.PostValueString(name)
2086 if err != nil {
2087 return 0, err
2088 }
2089
2090 return strParseInt8(value)
2091}
2092
2093// PostValueInt8Default same as PostValueInt8 but if errored it returns
2094// the given "def" default value.

Callers 1

PostValueInt8DefaultMethod · 0.95

Calls 2

PostValueStringMethod · 0.95
strParseInt8Function · 0.85

Tested by

no test coverage detected