MCPcopy
hub / github.com/perkeep/perkeep / Parse

Function Parse

pkg/blob/ref.go:215–217  ·  view source on GitHub ↗

Parse parse s as a blobref and returns the ref and whether it was parsed successfully.

(s string)

Source from the content-addressed store, hash-verified

213// Parse parse s as a blobref and returns the ref and whether it was
214// parsed successfully.
215func Parse(s string) (ref Ref, ok bool) {
216 return parse(s, true)
217}
218
219func parse(s string, allowAll bool) (ref Ref, ok bool) {
220 i := strings.Index(s, "-")

Callers 15

EnumerateBlobsOptsMethod · 0.92
UpdateShareChainMethod · 0.92
NewFromShareRootFunction · 0.92
ServeHTTPMethod · 0.92
accountMethod · 0.92
ChildPathObjectOrFuncMethod · 0.92
RunMethod · 0.92
FindChildRefsFunction · 0.92
matchesAtMostOneBlobMethod · 0.92

Calls 1

parseFunction · 0.70

Tested by 5

uploadTestBlobsFunction · 0.74
foreachZipEntryFunction · 0.74
TestReindexFunction · 0.74
BenchmarkParseBlobFunction · 0.68