(s string)
| 34 | } |
| 35 | |
| 36 | func ResolveLogicalOperator(s string) LogicalOperator { |
| 37 | switch strings.ToLower(strings.TrimSpace(s)) { |
| 38 | case "", "and": |
| 39 | return LogicalAnd |
| 40 | case "or": |
| 41 | return LogicalOr |
| 42 | default: |
| 43 | return "" |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | func IsValidLogicalOperator(op LogicalOperator) bool { |
| 48 | return op == "" || op == LogicalAnd || op == LogicalOr |
no outgoing calls