MCPcopy Index your code
hub / github.com/labstack/echo / intValue

Method intValue

binder.go:520–534  ·  view source on GitHub ↗
(sourceParam string, dest any, bitSize int, valueMustExist bool)

Source from the content-addressed store, hash-verified

518}
519
520func (b *ValueBinder) intValue(sourceParam string, dest any, bitSize int, valueMustExist bool) *ValueBinder {
521 if b.failFast && b.errors != nil {
522 return b
523 }
524
525 value := b.ValueFunc(sourceParam)
526 if value == "" {
527 if valueMustExist {
528 b.setError(b.ErrorFunc(sourceParam, []string{}, "required field value is empty", nil))
529 }
530 return b
531 }
532
533 return b.int(sourceParam, value, dest, bitSize)
534}
535
536func (b *ValueBinder) int(sourceParam string, value string, dest any, bitSize int) *ValueBinder {
537 n, err := strconv.ParseInt(value, 10, bitSize)

Callers 10

Int64Method · 0.95
MustInt64Method · 0.95
Int32Method · 0.95
MustInt32Method · 0.95
Int16Method · 0.95
MustInt16Method · 0.95
Int8Method · 0.95
MustInt8Method · 0.95
IntMethod · 0.95
MustIntMethod · 0.95

Calls 2

setErrorMethod · 0.95
intMethod · 0.95

Tested by

no test coverage detected