From 5c807dfba73f5fcd429abf0cccb112c7eb7cd442 Mon Sep 17 00:00:00 2001 From: sadmansakib Date: Thu, 27 May 2021 00:05:42 +0600 Subject: [PATCH] fix linting issues Signed-off-by: sadmansakib --- http_example_test.go | 6 ++++-- token.go | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/http_example_test.go b/http_example_test.go index 82e9c50..f3e72c8 100644 --- a/http_example_test.go +++ b/http_example_test.go @@ -7,8 +7,6 @@ import ( "bytes" "crypto/rsa" "fmt" - "github.com/dgrijalva/jwt-go" - "github.com/dgrijalva/jwt-go/request" "io" "io/ioutil" "log" @@ -17,6 +15,9 @@ import ( "net/url" "strings" "time" + + "github.com/dgrijalva/jwt-go" + "github.com/dgrijalva/jwt-go/request" ) // location of the files used for signing and verification @@ -55,6 +56,7 @@ func init() { // Setup listener listener, err := net.ListenTCP("tcp", &net.TCPAddr{}) + fatal(err) serverPort = listener.Addr().(*net.TCPAddr).Port log.Println("Listening...") diff --git a/token.go b/token.go index d637e08..99868d2 100644 --- a/token.go +++ b/token.go @@ -65,7 +65,7 @@ func (t *Token) SignedString(key interface{}) (string, error) { func (t *Token) SigningString() (string, error) { var err error parts := make([]string, 2) - for i, _ := range parts { + for i := range parts { var jsonValue []byte if i == 0 { if jsonValue, err = json.Marshal(t.Header); err != nil {