Skip to content

Commit

Permalink
clean lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
pitabwire committed Mar 16, 2024
1 parent 835bc7c commit 8939f55
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 12 deletions.
5 changes: 1 addition & 4 deletions authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -280,10 +280,7 @@ func (s *Service) getPemCert(token *jwt.Token) (any, error) {
return nil, err
}
defer func(Body io.ReadCloser) {
err := Body.Close()
if err != nil {

}
_ = Body.Close()
}(resp.Body)
jwkKeyBytes, err = io.ReadAll(resp.Body)
if err != nil {
Expand Down
2 changes: 0 additions & 2 deletions datastore.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,11 @@ func DBPropertiesToMap(props datatypes.JSONMap) map[string]string {

case bool:
payload[k] = strconv.FormatBool(v)
break
case int, int64, int32, int16, int8:
payload[k] = strconv.FormatInt(int64(val.(int)), 10)

case float32, float64:
payload[k] = strconv.FormatFloat(val.(float64), 'g', -1, 64)
break
default:

marVal, err1 := json.Marshal(val)
Expand Down
6 changes: 0 additions & 6 deletions logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,23 +52,17 @@ func Logger() Option {
switch logLevel {
case "debug":
logger.SetLevel(logrus.DebugLevel)
break
case "trace":
logger.SetLevel(logrus.TraceLevel)
break
case "warn":
logger.SetLevel(logrus.WarnLevel)
break
case "error":
logger.SetLevel(logrus.ErrorLevel)
break
case "fatal":
logger.SetLevel(logrus.FatalLevel)
break
default:

logger.SetLevel(logrus.InfoLevel)
break
}

s.logger = logger
Expand Down

0 comments on commit 8939f55

Please sign in to comment.