()
| 57 | } |
| 58 | |
| 59 | func (m *errMessage) getPrettifiedMessage() string { |
| 60 | if len(m.msgs) == 0 { |
| 61 | return "" |
| 62 | } |
| 63 | if len(m.msgs) == 1 { |
| 64 | return m.msgs[0] |
| 65 | } |
| 66 | effectiveMsg := strings.Join(m.msgs, "\n=====================\n") |
| 67 | effectiveMsg = "\t" + strings.ReplaceAll(effectiveMsg, "\n", "\n\t") |
| 68 | return fmt.Sprintf("\ncombined messages: \n{\n%s\n}", effectiveMsg) |
| 69 | } |
| 70 | |
| 71 | // Format formats the messages into a single string |
| 72 | func (m Messages) Format() string { |