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

Method PostValueInt64

context/context.go:2156–2163  ·  view source on GitHub ↗

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

(name string)

Source from the content-addressed store, hash-verified

2154//
2155// See ErrEmptyForm, ErrNotFound and ErrEmptyFormField respectfully.
2156func (ctx *Context) PostValueInt64(name string) (int64, error) {
2157 value, err := ctx.PostValueString(name)
2158 if err != nil {
2159 return 0, err
2160 }
2161
2162 return strParseInt64(value)
2163}
2164
2165// PostValueInt64Default same as PostValueInt64 but if errored it returns
2166// the given "def" default value.

Callers 1

PostValueInt64DefaultMethod · 0.95

Calls 2

PostValueStringMethod · 0.95
strParseInt64Function · 0.85

Tested by

no test coverage detected