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

Function FilterSpecialIdentities

expr/node.go:404–415  ·  view source on GitHub ↗

FilterSpecialIdentities given a list of identities, filter out special identities such as "null", "*", "match_all"

(l []string)

Source from the content-addressed store, hash-verified

402// FilterSpecialIdentities given a list of identities, filter out
403// special identities such as "null", "*", "match_all"
404func FilterSpecialIdentities(l []string) []string {
405 s := make([]string, 0, len(l))
406 for _, val := range l {
407 switch strings.ToLower(val) {
408 case "*", "match_all", "null", "true", "false":
409 // skip
410 default:
411 s = append(s, val)
412 }
413 }
414 return s
415}
416
417// Strings get all identity strings
418func (m IdentityNodes) Strings() []string {

Callers 1

TestIdentityNamesFunction · 0.92

Calls

no outgoing calls

Tested by 1

TestIdentityNamesFunction · 0.74