FilterSpecialIdentities given a list of identities, filter out special identities such as "null", "*", "match_all"
(l []string)
| 402 | // FilterSpecialIdentities given a list of identities, filter out |
| 403 | // special identities such as "null", "*", "match_all" |
| 404 | func 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 |
| 418 | func (m IdentityNodes) Strings() []string { |
no outgoing calls