From 717503fcf6271b969f20f64571115843c376aa1a Mon Sep 17 00:00:00 2001 From: Herman Junge Date: Wed, 12 Mar 2014 03:50:48 -0400 Subject: [PATCH] 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 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 24b60e8..df6ed4d 100644 --- a/README.md +++ b/README.md @@ -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)