()
| 114 | } |
| 115 | |
| 116 | func (c *recordCache) new() *record { |
| 117 | if c.index == len(c.records) { |
| 118 | c.records = append(c.records, new(record)) |
| 119 | } |
| 120 | r := c.records[c.index] |
| 121 | r.fields = r.fields[:0] |
| 122 | r.records = r.records[:0] |
| 123 | c.index++ |
| 124 | return r |
| 125 | } |
| 126 | |
| 127 | func (c *recordCache) reset() { |
| 128 | c.index = 0 |