NewIndex creates an empty Index.
()
| 40 | |
| 41 | // NewIndex creates an empty Index. |
| 42 | func NewIndex() *Index { |
| 43 | return &Index{ |
| 44 | byGram: make(map[uint32][]uint32), |
| 45 | byPrefix2: make(map[uint16][]uint32), |
| 46 | byPath: make(map[string]uint32), |
| 47 | deleted: make(map[uint32]bool), |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | // Add inserts a path into the index, tombstoning any previous entry. |
| 52 | func (idx *Index) Add(path string, flags uint16) uint32 { |
no outgoing calls