MCPcopy
hub / github.com/google/codesearch / NameBytes

Method NameBytes

index/read.go:157–160  ·  view source on GitHub ↗

NameBytes returns the name corresponding to the given fileid.

(fileid uint32)

Source from the content-addressed store, hash-verified

155
156// NameBytes returns the name corresponding to the given fileid.
157func (ix *Index) NameBytes(fileid uint32) []byte {
158 off := ix.uint32(ix.nameIndex + 4*fileid)
159 return ix.str(ix.nameData + off)
160}
161
162func (ix *Index) str(off uint32) []byte {
163 str := ix.slice(off, -1)

Callers 1

NameMethod · 0.95

Calls 2

uint32Method · 0.95
strMethod · 0.95

Tested by

no test coverage detected