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

Method addFile

index/write.go:341–345  ·  view source on GitHub ↗
(f *os.File)

Source from the content-addressed store, hash-verified

339}
340
341func (h *postHeap) addFile(f *os.File) {
342 data := mmapFile(f).d
343 m := (*[npost]postEntry)(unsafe.Pointer(&data[0]))[:len(data)/8]
344 h.addMem(m)
345}
346
347func (h *postHeap) addMem(x []postEntry) {
348 h.add(&postChunk{m: x})

Callers 1

mergePostMethod · 0.95

Calls 2

addMemMethod · 0.95
mmapFileFunction · 0.70

Tested by

no test coverage detected