formatPointer prints the address of the pointer.
(p value.Pointer, withDelims bool)
| 20 | |
| 21 | // formatPointer prints the address of the pointer. |
| 22 | func formatPointer(p value.Pointer, withDelims bool) string { |
| 23 | v := p.Uintptr() |
| 24 | if flags.Deterministic { |
| 25 | v = 0xdeadf00f // Only used for stable testing purposes |
| 26 | } |
| 27 | if withDelims { |
| 28 | return pointerDelimPrefix + formatHex(uint64(v)) + pointerDelimSuffix |
| 29 | } |
| 30 | return formatHex(uint64(v)) |
| 31 | } |
| 32 | |
| 33 | // pointerReferences is a stack of pointers visited so far. |
| 34 | type pointerReferences [][2]value.Pointer |
no test coverage detected