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

Method floatsValue

binder.go:1043–1056  ·  view source on GitHub ↗
(sourceParam string, dest any, valueMustExist bool)

Source from the content-addressed store, hash-verified

1041}
1042
1043func (b *ValueBinder) floatsValue(sourceParam string, dest any, valueMustExist bool) *ValueBinder {
1044 if b.failFast && b.errors != nil {
1045 return b
1046 }
1047
1048 values := b.ValuesFunc(sourceParam)
1049 if len(values) == 0 {
1050 if valueMustExist {
1051 b.setError(b.ErrorFunc(sourceParam, []string{}, "required field value is empty", nil))
1052 }
1053 return b
1054 }
1055 return b.floats(sourceParam, values, dest)
1056}
1057
1058func (b *ValueBinder) floats(sourceParam string, values []string, dest any) *ValueBinder {
1059 switch d := dest.(type) {

Callers 4

Float64sMethod · 0.95
MustFloat64sMethod · 0.95
Float32sMethod · 0.95
MustFloat32sMethod · 0.95

Calls 2

setErrorMethod · 0.95
floatsMethod · 0.95

Tested by

no test coverage detected