MCPcopy Create free account
hub / github.com/cockroachdb/errors / FlattenHints

Function FlattenHints

hintdetail/hintdetail.go:61–70  ·  view source on GitHub ↗

FlattenHints retrieves the hints as per GetAllHints() and concatenates them into a single string.

(err error)

Source from the content-addressed store, hash-verified

59// FlattenHints retrieves the hints as per GetAllHints() and
60// concatenates them into a single string.
61func FlattenHints(err error) string {
62 var b bytes.Buffer
63 sep := ""
64 for _, h := range GetAllHints(err) {
65 b.WriteString(sep)
66 b.WriteString(h)
67 sep = "\n--\n"
68 }
69 return b.String()
70}
71
72func getAllHintsInternal(err error, hints []string, seen map[string]struct{}) []string {
73 if c := errbase.UnwrapOnce(err); c != nil {

Callers 2

FlattenHintsFunction · 0.92
TestMultiHintDetailFunction · 0.92

Calls 2

GetAllHintsFunction · 0.70
StringMethod · 0.45

Tested by 1

TestMultiHintDetailFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…