From 9d0dcba491dbcb031a8b0a5722e8b02fcfff3a59 Mon Sep 17 00:00:00 2001 From: Dave Grijalva Date: Tue, 12 Apr 2016 14:31:41 -0700 Subject: [PATCH] fix for weird map pointer crap --- hmac_example_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hmac_example_test.go b/hmac_example_test.go index f8d2fc4..8fb5678 100644 --- a/hmac_example_test.go +++ b/hmac_example_test.go @@ -54,8 +54,8 @@ func ExampleParse_hmac() { return hmacSampleSecret, nil }) - if claims, ok := token.Claims.(*jwt.MapClaims); ok && token.Valid { - fmt.Println((*claims)["foo"], (*claims)["nbf"]) + if claims, ok := token.Claims.(jwt.MapClaims); ok && token.Valid { + fmt.Println(claims["foo"], claims["nbf"]) } else { fmt.Println(err) }