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

Method boolsValue

binder.go:952–965  ·  view source on GitHub ↗
(sourceParam string, dest *[]bool, valueMustExist bool)

Source from the content-addressed store, hash-verified

950}
951
952func (b *ValueBinder) boolsValue(sourceParam string, dest *[]bool, valueMustExist bool) *ValueBinder {
953 if b.failFast && b.errors != nil {
954 return b
955 }
956
957 values := b.ValuesFunc(sourceParam)
958 if len(values) == 0 {
959 if valueMustExist {
960 b.setError(b.ErrorFunc(sourceParam, []string{}, "required field value is empty", nil))
961 }
962 return b
963 }
964 return b.bools(sourceParam, values, dest)
965}
966
967func (b *ValueBinder) bools(sourceParam string, values []string, dest *[]bool) *ValueBinder {
968 tmp := make([]bool, len(values))

Callers 2

BoolsMethod · 0.95
MustBoolsMethod · 0.95

Calls 2

setErrorMethod · 0.95
boolsMethod · 0.95

Tested by

no test coverage detected