Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions format.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ func ListFormatFunc(es []error) string {
"%d error(s) occurred:\n\n%s",
len(es), strings.Join(points, "\n"))
}

// DefaultErrorFormatFunc is global default ErrorFormatFunc
var DefaultErrorFormatFunc ErrorFormatFunc = ListFormatFunc
2 changes: 1 addition & 1 deletion multierror.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Error struct {
func (e *Error) Error() string {
fn := e.ErrorFormat
if fn == nil {
fn = ListFormatFunc
fn = DefaultErrorFormatFunc
}

return fn(e.Errors)
Expand Down