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

Method flush

index/write.go:528–537  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

526}
527
528func (b *bufWriter) flush() {
529 if len(b.buf) == 0 {
530 return
531 }
532 _, err := b.file.Write(b.buf)
533 if err != nil {
534 log.Fatalf("writing %s: %v", b.name, err)
535 }
536 b.buf = b.buf[:0]
537}
538
539// finish flushes the file to disk and returns an open file ready for reading.
540func (b *bufWriter) finish() *os.File {

Callers 10

writeMethod · 0.95
writeByteMethod · 0.95
writeStringMethod · 0.95
finishMethod · 0.95
writeTrigramMethod · 0.95
writeUint32Method · 0.95
writeUvarintMethod · 0.95
MergeFunction · 0.80
FlushMethod · 0.80
copyFileFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected