fix for weird map pointer crap

This commit is contained in:
Dave Grijalva 2016-04-12 14:31:41 -07:00
parent 0145da90d4
commit 9d0dcba491
1 changed files with 2 additions and 2 deletions

View File

@ -54,8 +54,8 @@ func ExampleParse_hmac() {
return hmacSampleSecret, nil return hmacSampleSecret, nil
}) })
if claims, ok := token.Claims.(*jwt.MapClaims); ok && token.Valid { if claims, ok := token.Claims.(jwt.MapClaims); ok && token.Valid {
fmt.Println((*claims)["foo"], (*claims)["nbf"]) fmt.Println(claims["foo"], claims["nbf"])
} else { } else {
fmt.Println(err) fmt.Println(err)
} }