MCPcopy Index your code
hub / github.com/google/codesearch / add

Method add

index/write.go:370–376  ·  view source on GitHub ↗

add adds the chunk to the postHeap. All adds must be called before the first call to next.

(ch *postChunk)

Source from the content-addressed store, hash-verified

368// add adds the chunk to the postHeap.
369// All adds must be called before the first call to next.
370func (h *postHeap) add(ch *postChunk) {
371 if len(ch.m) > 0 {
372 ch.e = ch.m[0]
373 ch.m = ch.m[1:]
374 h.push(ch)
375 }
376}
377
378// empty reports whether the postHeap is empty.
379func (h *postHeap) empty() bool {

Callers 1

addMemMethod · 0.95

Calls 1

pushMethod · 0.95

Tested by

no test coverage detected