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:
Henry 2014-05-17 01:18:17 +02:00
parent 71c6a65cfe
commit dea87c4cd8
1 changed files with 1 additions and 1 deletions

2
jwt.go
View File

@ -172,7 +172,7 @@ type ValidationError struct {
}
// Validation error is an error type
func (e *ValidationError) Error() string {
func (e ValidationError) Error() string {
if e.err == "" {
return "Token is invalid"
}