Update README.md

You cannot perform the not (`!`) operator on an `error`. It gives you `invalid operation: ! error`.

Tested in Go Playground: http://play.golang.org/p/jhlsHoS_gc
and locally on go1.2
This commit is contained in:
Herman Junge 2014-03-12 03:50:48 -04:00
parent bdb2a327a9
commit 717503fcf6
1 changed files with 2 additions and 2 deletions

View File

@ -10,7 +10,7 @@ This library is considered production ready. Feedback and feature requests are
return myLookupKey(token.Header["kid"])
})
if !err && token.Valid {
if err == null && token.Valid {
deliverGoodness("!")
} else {
deliverUtterRejection(":(")
@ -26,4 +26,4 @@ This library is considered production ready. Feedback and feature requests are
tokenString, err := token.SignedString(mySigningKey)
```
Documentation can be found [here](http://godoc.org/github.com/dgrijalva/jwt-go)
Documentation can be found [here](http://godoc.org/github.com/dgrijalva/jwt-go)