Function
formatMsgHintDetail
(prefix, msg, hint, detail string)
Source from the content-addressed store, hash-verified
| 63 | } |
| 64 | |
| 65 | func formatMsgHintDetail(prefix, msg, hint, detail string) string { |
| 66 | var b strings.Builder |
| 67 | b.WriteString(prefix) |
| 68 | b.WriteString(msg) |
| 69 | if hint != "" { |
| 70 | b.WriteString("\nHINT: ") |
| 71 | b.WriteString(hint) |
| 72 | } |
| 73 | if detail != "" { |
| 74 | b.WriteString("\nDETAIL: ") |
| 75 | b.WriteString(detail) |
| 76 | } |
| 77 | return b.String() |
| 78 | } |
| 79 | |
| 80 | // NewWithDepthf creates an error with a pg code and extracts the context |
| 81 | // information at the specified depth level. |
Tested by
no test coverage detected
Used in the wild real call sites across dependent graphs
searching dependent graphs…