NewQuery returns a pointer to a Query.
()
| 19 | |
| 20 | // NewQuery returns a pointer to a Query. |
| 21 | func NewQuery() *Query { |
| 22 | return &Query{ |
| 23 | Attributes: make([]string, 0), |
| 24 | Modifiers: make(map[string][]Modifier), |
| 25 | Sources: map[string][]string{ |
| 26 | "include": make([]string, 0), |
| 27 | "exclude": make([]string, 0), |
| 28 | }, |
| 29 | SourceAliases: make(map[string]string), |
| 30 | ConditionTree: nil, |
| 31 | } |
| 32 | } |
| 33 | |
| 34 | // HasAttribute checks if this query contains any of the provided attributes. |
| 35 | func (q *Query) HasAttribute(attributes ...string) bool { |
no outgoing calls