func (ec chain) Unwrap() error {
	if len(ec) == 1 {
		return nil
	}
	return ec[1:]
}
Unwrap implements errors.Unwrap by returning the next error in the chain or
nil if there are no more errors.
package multierror
import (
	"errors"
	"fmt"
	"strings"
)
var _ error = (*Error)(nil)
type Error struct {
	Errors []error
}
func New(errs ...error) *Error {
	e := Error{}
	e.Append(errs...)
	return &e
}
func (e *Error) Error() string {
	return format(e.Errors)
}
func (e *Error) Append(errs ...error) {
	e.Errors = append(e.Errors, errs...)
}
func (e *Error) ErrorOrNil() error {
	if e == nil || len(e.Errors) == 0 {
		return nil
	}
	return e
}
func (e *Error) WrapErrorOrNil(toWrap error) error {
	if err := e.ErrorOrNil(); err != nil {
		return fmt.Errorf("%v: %w", err, toWrap)
	}
	return nil
}
func (e *Error) Unwrap() error {
	if e == nil || len(e.Errors) == 0 {
		return nil
	}
	if len(e.Errors) == 0 {
		return e.Errors[0]
	}
	errs := make([]error, len(e.Errors))
	copy(errs, e.Errors)
	return chain(errs)
}
type chain []error
func (ec chain) Error() string {
	return ec[0].Error()
}