MCPcopy Create free account
hub / github.com/araddon/qlbridge / lowerFieldMatch

Function lowerFieldMatch

datasource/context_wrapper.go:108–114  ·  view source on GitHub ↗

func (s *state) evalFunction(dot reflect.Value, node *expr.IdentityNode, cmd expr.Node, args []expr.Node, final reflect.Value) reflect.Value { name := node.Text function, ok := findFunction(name, s.tmpl) if !ok { return s.errorf("%q is not a defined function", name) } return s.evalCall(dot, f

(fieldName string)

Source from the content-addressed store, hash-verified

106// }
107
108func lowerFieldMatch(fieldName string) func(string) bool {
109 lowerField := strings.ToLower(fieldName)
110 return func(field string) bool {
111 //u.Debugf("check: %s == %s ?", field, lowerField)
112 return strings.ToLower(field) == lowerField
113 }
114}
115
116// evalField evaluates an expression like (.Field) or (.Field arg1 arg2).
117// The 'final' argument represents the return value from the preceding

Callers 1

evalFieldMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected