forked from mirror/jwt
Unwrap for ValidationError (#125)
This commit is contained in:
parent
1275a5b909
commit
823c014036
|
@ -53,6 +53,11 @@ func (e ValidationError) Error() string {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Unwrap gives errors.Is and errors.As access to the inner error.
|
||||||
|
func (e *ValidationError) Unwrap() error {
|
||||||
|
return e.Inner
|
||||||
|
}
|
||||||
|
|
||||||
// No errors
|
// No errors
|
||||||
func (e *ValidationError) valid() bool {
|
func (e *ValidationError) valid() bool {
|
||||||
return e.Errors == 0
|
return e.Errors == 0
|
||||||
|
|
Loading…
Reference in New Issue