MCPcopy
hub / github.com/perkeep/perkeep / String

Method String

pkg/blob/ref.go:74–83  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

72}
73
74func (r Ref) String() string {
75 if r.digest == nil {
76 return "<invalid-blob.Ref>"
77 }
78 dname := r.digest.digestName()
79 bs := r.digest.bytes()
80 buf := getBuf(len(dname) + 1 + len(bs)*2)[:0]
81 defer putBuf(buf)
82 return string(r.appendString(buf))
83}
84
85// StringMinusOne returns the first string that's before String.
86func (r Ref) StringMinusOne() string {

Callers 15

DomIDMethod · 0.95
EnumerateBlobsMethod · 0.95
IndexFunction · 0.95
make.goFile · 0.45
mainFunction · 0.45
FetchMethod · 0.45
TestParseFunction · 0.45
TestJSONUnmarshalFunction · 0.45
StringMethod · 0.45
SignMethod · 0.45
ParseArmoredPublicKeyFunction · 0.45
ArmoredPublicKeyFunction · 0.45

Calls 5

appendStringMethod · 0.95
getBufFunction · 0.70
putBufFunction · 0.70
digestNameMethod · 0.65
bytesMethod · 0.65

Tested by 5

TestParseFunction · 0.36
TestJSONUnmarshalFunction · 0.36
TestSigningFunction · 0.36
entityStringFunction · 0.36
TestDocHandlerFunction · 0.36