Error concatenates the errors in e with a newline between each.
()
| 23 | |
| 24 | // Error concatenates the errors in e with a newline between each. |
| 25 | func (e ErrorList) Error() string { |
| 26 | var b strings.Builder |
| 27 | for i, err := range e { |
| 28 | if i > 0 { |
| 29 | b.WriteByte('\n') |
| 30 | } |
| 31 | b.WriteString(err.Error()) |
| 32 | } |
| 33 | return b.String() |
| 34 | } |
| 35 | |
| 36 | type Error struct { |
| 37 | Msg string |