func ContainsType(err error, v interface{}) bool {
	return len(GetAllType(err, v)) > 0
}
ContainsType checks if the given error contains an error with
the same concrete type as v. If err is not a wrapped error, this will
check the err itself.
package errwrap
import (
	"errors"
	"reflect"
	"strings"
)
type WalkFunc func(error)
type Wrapper interface {
	WrappedErrors() []error
}
func Wrap(outer, inner error) error {
	return &wrappedError{
		Outer: outer,
		Inner: inner,
	}
}
func Wrapf(format string, err error) error {
	outerMsg := "<nil>"
	if err != nil {
		outerMsg = err.Error()
	}
	outer := errors.New(strings.Replace(
		format, "{{err}}", outerMsg, -1))
	return Wrap(outer, err)
}
func Contains(err error, msg string) bool {
	return len(GetAll(err, msg)) > 0
}