MCPcopy
hub / github.com/google/go-cmp / makeLeafReference

Function makeLeafReference

cmp/report_references.go:101–108  ·  view source on GitHub ↗
(p value.Pointer, printAddress bool)

Source from the content-addressed store, hash-verified

99 return &textWrap{Prefix: prefix, Value: s, Metadata: trunkReference{p}}
100}
101func makeLeafReference(p value.Pointer, printAddress bool) textNode {
102 out := &textWrap{Prefix: "(", Value: textEllipsis, Suffix: ")"}
103 var prefix string
104 if printAddress {
105 prefix = formatPointer(p, true)
106 }
107 return &textWrap{Prefix: prefix, Value: out, Metadata: leafReference{p}}
108}
109
110// resolveReferences walks the textNode tree searching for any leaf reference
111// metadata and resolves each against the corresponding trunk references.

Callers 1

FormatValueMethod · 0.85

Calls 1

formatPointerFunction · 0.85

Tested by

no test coverage detected