FlattenHints retrieves the hints as per GetAllHints() and concatenates them into a single string.
(err error)
| 59 | // FlattenHints retrieves the hints as per GetAllHints() and |
| 60 | // concatenates them into a single string. |
| 61 | func 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 | |
| 72 | func getAllHintsInternal(err error, hints []string, seen map[string]struct{}) []string { |
| 73 | if c := errbase.UnwrapOnce(err); c != nil { |
searching dependent graphs…