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

Method write

index/write.go:483–495  ·  view source on GitHub ↗
(x []byte)

Source from the content-addressed store, hash-verified

481}
482
483func (b *bufWriter) write(x []byte) {
484 n := cap(b.buf) - len(b.buf)
485 if len(x) > n {
486 b.flush()
487 if len(x) >= cap(b.buf) {
488 if _, err := b.file.Write(x); err != nil {
489 log.Fatalf("writing %s: %v", b.name, err)
490 }
491 return
492 }
493 }
494 b.buf = append(b.buf, x...)
495}
496
497func (b *bufWriter) writeByte(x byte) {
498 if len(b.buf) >= cap(b.buf) {

Callers 1

mergePostMethod · 0.80

Calls 1

flushMethod · 0.95

Tested by

no test coverage detected