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

Function buildFlushIndex

index/write_test.go:118–133  ·  view source on GitHub ↗
(out string, paths []string, doFlush bool, fileData map[string]string)

Source from the content-addressed store, hash-verified

116}
117
118func buildFlushIndex(out string, paths []string, doFlush bool, fileData map[string]string) {
119 ix := Create(out)
120 ix.AddPaths(paths)
121 var files []string
122 for name := range fileData {
123 files = append(files, name)
124 }
125 sort.Strings(files)
126 for _, name := range files {
127 ix.Add(name, strings.NewReader(fileData[name]))
128 }
129 if doFlush {
130 ix.flushPost()
131 }
132 ix.Flush()
133}
134
135func buildIndex(name string, paths []string, fileData map[string]string) {
136 buildFlushIndex(name, paths, false, fileData)

Callers 2

buildIndexFunction · 0.85
testTrivialWriteFunction · 0.85

Calls 5

CreateFunction · 0.85
AddPathsMethod · 0.80
flushPostMethod · 0.80
FlushMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…