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

Method offset

index/write.go:519–526  ·  view source on GitHub ↗

offset returns the current write offset.

()

Source from the content-addressed store, hash-verified

517
518// offset returns the current write offset.
519func (b *bufWriter) offset() uint32 {
520 off, _ := b.file.Seek(0, 1)
521 off += int64(len(b.buf))
522 if int64(uint32(off)) != off {
523 log.Fatalf("index is larger than 4GB")
524 }
525 return uint32(off)
526}
527
528func (b *bufWriter) flush() {
529 if len(b.buf) == 0 {

Callers 6

MergeFunction · 0.80
initMethod · 0.80
trigramMethod · 0.80
FlushMethod · 0.80
addNameMethod · 0.80
mergePostMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected