From 83c2b30a8bea7940d28945f722c57285c7de9ecd Mon Sep 17 00:00:00 2001 From: Kjetil Mehl Date: Thu, 22 May 2014 20:27:05 +0200 Subject: [PATCH] Update jwt.go Hi! I'm using Go 1.0.2 and encountered "src/github.com/dgrijalva/jwt-go/jwt.go:87: function ends without a return statement". This commit returns explicit at the end of the function. --- jwt.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/jwt.go b/jwt.go index c08d80a..d4f191a 100644 --- a/jwt.go +++ b/jwt.go @@ -151,9 +151,8 @@ func Parse(tokenString string, keyFunc Keyfunc) (*Token, error) { return token, vErr - } else { - return nil, &ValidationError{err: "Token contains an invalid number of segments", Errors: ValidationErrorMalformed} } + return nil, &ValidationError{err: "Token contains an invalid number of segments", Errors: ValidationErrorMalformed} } // The errors that might occur when parsing and validating a token