diff --git a/internal/mutlierror/multierror.go b/internal/mutlierror/multierror.go index 6672a75ee..ca697f118 100644 --- a/internal/mutlierror/multierror.go +++ b/internal/mutlierror/multierror.go @@ -36,6 +36,10 @@ func (m MultiError) Error() string { } func New(errs ...error) error { + if len(errs) == 1 { + // callers might not always check this beforehand, but building a MultiError for a single error is useless + return errs[0] + } return MultiError{ Errors: errs, }