MCPcopy
hub / github.com/kopia/kopia / String

Method String

repo/object/objectid.go:63–83  ·  view source on GitHub ↗

String returns string representation of ObjectID that is suitable for displaying in the UI.

()

Source from the content-addressed store, hash-verified

61
62// String returns string representation of ObjectID that is suitable for displaying in the UI.
63func (i ID) String() string {
64 var (
65 indirectPrefix string
66 compressionPrefix string
67 )
68
69 switch i.indirection {
70 case 0:
71 // no prefix
72 case 1:
73 indirectPrefix = "I"
74 default:
75 indirectPrefix = strings.Repeat("I", int(i.indirection))
76 }
77
78 if i.compression {
79 compressionPrefix = "Z"
80 }
81
82 return indirectPrefix + compressionPrefix + i.cid.String()
83}
84
85// Append appends string representation of ObjectID that is suitable for displaying in the UI.
86func (i ID) Append(out []byte) []byte {

Callers 15

MarshalJSONMethod · 0.95
ToStringMethod · 0.45
TestJSONSenderFunction · 0.45
TestWebhookFunction · 0.45
verifyTemplateFunction · 0.45
functionsFunction · 0.45
runMethod · 0.45
definitionPointToStringFunction · 0.45
appendActionCommandRowsFunction · 0.45

Calls 1

RepeatMethod · 0.80

Tested by 15

TestJSONSenderFunction · 0.36
TestWebhookFunction · 0.36
verifyTemplateFunction · 0.36
TestSnapshotVerifyFunction · 0.36
TestServerNotificationsFunction · 0.36
TestImportPolicyFunction · 0.36
TestExportPolicyFunction · 0.36
TestSnapshotFixFunction · 0.36
mustListDirEntriesFunction · 0.36
TestWritersMethod · 0.36