Commit 717503fc authored by Herman Junge's avatar Herman Junge

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
parent bdb2a327
......@@ -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)
\ No newline at end of file
Documentation can be found [here](http://godoc.org/github.com/dgrijalva/jwt-go)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment