forked from mirror/jwt
jwt.ValidationError didn't not implement error
I tried to type assert the err from jwt.Parse() and got this ``` ./main.go:135: impossible type assertion: jwt.ValidationError does not implement error (Error method has pointer receiver) ``` this fixes it and makes the Errors field accessible.
This commit is contained in:
parent
71c6a65cfe
commit
dea87c4cd8
2
jwt.go
2
jwt.go
|
@ -172,7 +172,7 @@ type ValidationError struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Validation error is an error type
|
// Validation error is an error type
|
||||||
func (e *ValidationError) Error() string {
|
func (e ValidationError) Error() string {
|
||||||
if e.err == "" {
|
if e.err == "" {
|
||||||
return "Token is invalid"
|
return "Token is invalid"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue