MCPcopy
hub / github.com/perkeep/perkeep / MustParse

Function MustParse

pkg/blob/ref.go:284–290  ·  view source on GitHub ↗

MustParse parse s as a blobref and panics on failure.

(s string)

Source from the content-addressed store, hash-verified

282
283// MustParse parse s as a blobref and panics on failure.
284func MustParse(s string) Ref {
285 ref, ok := Parse(s)
286 if !ok {
287 panic("Invalid blobref " + s)
288 }
289 return ref
290}
291
292// '0' => 0 ... 'f' => 15, else sets *bad to true.
293func hexVal(b byte, bad *bool) byte {

Callers 15

TestDescribeMarshalFunction · 0.92
describe_test.goFile · 0.92
EnumerateBlobsMethod · 0.92
TestHubRegistrationFunction · 0.92
TestHubFiringFunction · 0.92
sendTestBlobsFunction · 0.92
TestPathsFunction · 0.92
ReceiveBlobMethod · 0.92
TestBlobFromURLPathFunction · 0.92
TestServeBlobRef_RangeFunction · 0.92
testServeBlobRefFunction · 0.92

Calls 1

ParseFunction · 0.85

Tested by 15

TestDescribeMarshalFunction · 0.74
EnumerateBlobsMethod · 0.74
TestHubRegistrationFunction · 0.74
TestHubFiringFunction · 0.74
sendTestBlobsFunction · 0.74
TestPathsFunction · 0.74
TestBlobFromURLPathFunction · 0.74
TestServeBlobRef_RangeFunction · 0.74
testServeBlobRefFunction · 0.74
TestParseMetaRowFunction · 0.74
okayWithoutMetaFunction · 0.74
TestParseZipMetaRowFunction · 0.74