Update README.md

`jwt.New()` only returns one parameter, `*Token`
This commit is contained in:
Herman Junge 2014-03-12 01:31:24 -04:00
parent bdb2a327a9
commit bd53e37c6d
1 changed files with 2 additions and 2 deletions

View File

@ -20,10 +20,10 @@ This library is considered production ready. Feedback and feature requests are
## Create a token
```go
token, _ := jwt.New(jwt.GetSigningMethod("HS256"))
token := jwt.New(jwt.GetSigningMethod("HS256"))
token.Claims["foo"] = "bar"
token.Claims["exp"] = time.Now().Add(time.Hour * 72).Unix()
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)