Eval returns true if buf matches the receiver and false otherwise.
(types super.TypeFetcher, buf []byte)
| 67 | |
| 68 | // Eval returns true if buf matches the receiver and false otherwise. |
| 69 | func (b *BufferFilter) Eval(types super.TypeFetcher, buf []byte) bool { |
| 70 | switch b.op { |
| 71 | case opAnd: |
| 72 | return b.left.Eval(types, buf) && b.right.Eval(types, buf) |
| 73 | case opOr: |
| 74 | return b.left.Eval(types, buf) || b.right.Eval(types, buf) |
| 75 | case opFieldNameFinder: |
| 76 | return b.fnf.Find(types, buf) |
| 77 | case opStringCaseFinder: |
| 78 | return b.cf.Next(byteconv.UnsafeString(buf)) > -1 |
| 79 | case opStringFinder: |
| 80 | return b.f.Next(byteconv.UnsafeString(buf)) > -1 |
| 81 | default: |
| 82 | panic(fmt.Sprintf("BufferFilter: unknown op %d", b.op)) |
| 83 | } |
| 84 | } |
nothing calls this directly
no test coverage detected