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

Method bool

binder.go:941–950  ·  view source on GitHub ↗
(sourceParam string, value string, dest *bool)

Source from the content-addressed store, hash-verified

939}
940
941func (b *ValueBinder) bool(sourceParam string, value string, dest *bool) *ValueBinder {
942 n, err := strconv.ParseBool(value)
943 if err != nil {
944 b.setError(b.ErrorFunc(sourceParam, []string{value}, "failed to bind field value to bool", err))
945 return b
946 }
947
948 *dest = n
949 return b
950}
951
952func (b *ValueBinder) boolsValue(sourceParam string, dest *[]bool, valueMustExist bool) *ValueBinder {
953 if b.failFast && b.errors != nil {

Callers 2

boolValueMethod · 0.95
boolsMethod · 0.95

Calls 1

setErrorMethod · 0.95

Tested by

no test coverage detected