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

Function TypeString

cmp/internal/value/name.go:16–18  ·  view source on GitHub ↗

TypeString is nearly identical to reflect.Type.String, but has an additional option to specify that full type names be used.

(t reflect.Type, qualified bool)

Source from the content-addressed store, hash-verified

14// TypeString is nearly identical to reflect.Type.String,
15// but has an additional option to specify that full type names be used.
16func TypeString(t reflect.Type, qualified bool) string {
17 return string(appendTypeName(nil, t, qualified, false))
18}
19
20func appendTypeName(b []byte, t reflect.Type, qualified, elideFunc bool) []byte {
21 // BUG: Go reflection provides no way to disambiguate two named types

Callers 4

StringMethod · 0.92
StringMethod · 0.92
FormatTypeMethod · 0.92
TestTypeStringFunction · 0.85

Calls 1

appendTypeNameFunction · 0.85

Tested by 1

TestTypeStringFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…