fix linting issues

Signed-off-by: sadmansakib <ssadman8@gmail.com>
This commit is contained in:
sadmansakib 2021-05-27 00:05:42 +06:00
parent 749d686021
commit 5c807dfba7
2 changed files with 5 additions and 3 deletions

View File

@ -7,8 +7,6 @@ import (
"bytes" "bytes"
"crypto/rsa" "crypto/rsa"
"fmt" "fmt"
"github.com/dgrijalva/jwt-go"
"github.com/dgrijalva/jwt-go/request"
"io" "io"
"io/ioutil" "io/ioutil"
"log" "log"
@ -17,6 +15,9 @@ import (
"net/url" "net/url"
"strings" "strings"
"time" "time"
"github.com/dgrijalva/jwt-go"
"github.com/dgrijalva/jwt-go/request"
) )
// location of the files used for signing and verification // location of the files used for signing and verification
@ -55,6 +56,7 @@ func init() {
// Setup listener // Setup listener
listener, err := net.ListenTCP("tcp", &net.TCPAddr{}) listener, err := net.ListenTCP("tcp", &net.TCPAddr{})
fatal(err)
serverPort = listener.Addr().(*net.TCPAddr).Port serverPort = listener.Addr().(*net.TCPAddr).Port
log.Println("Listening...") log.Println("Listening...")

View File

@ -65,7 +65,7 @@ func (t *Token) SignedString(key interface{}) (string, error) {
func (t *Token) SigningString() (string, error) { func (t *Token) SigningString() (string, error) {
var err error var err error
parts := make([]string, 2) parts := make([]string, 2)
for i, _ := range parts { for i := range parts {
var jsonValue []byte var jsonValue []byte
if i == 0 { if i == 0 {
if jsonValue, err = json.Marshal(t.Header); err != nil { if jsonValue, err = json.Marshal(t.Header); err != nil {