Skip to content

Commit

Permalink
fix lint check
Browse files Browse the repository at this point in the history
  • Loading branch information
justlorain committed Dec 26, 2024
1 parent 2bb4299 commit 6e425c8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
3 changes: 2 additions & 1 deletion auth_jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,8 @@ func (mw *HertzJWTMiddleware) privateKey() error {
}

if mw.PrivateKeyPassphrase != "" {
key, err := jwt.ParseRSAPrivateKeyFromPEMWithPassword(keyData, mw.PrivateKeyPassphrase) //lint:ignore SA1019 ignoreCheck
// nolint:staticcheck
key, err := jwt.ParseRSAPrivateKeyFromPEMWithPassword(keyData, mw.PrivateKeyPassphrase)
if err != nil {
return ErrInvalidPrivKey
}
Expand Down
6 changes: 4 additions & 2 deletions auth_jwt_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,10 @@ import (

// Login form structure.
type Login struct {
Username string `json:"username,required"` //lint:ignore SA5008 ignoreCheck
Password string `json:"password,required"` //lint:ignore SA5008 ignoreCheck
// nolint:staticcheck
Username string `json:"username,required"`
// nolint:staticcheck
Password string `json:"password,required"`
}

var (
Expand Down
6 changes: 4 additions & 2 deletions example/basic/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,10 @@ import (
)

type login struct {
Username string `form:"username,required" json:"username,required"` //lint:ignore SA5008 ignoreCheck
Password string `form:"password,required" json:"password,required"` //lint:ignore SA5008 ignoreCheck
// nolint:staticcheck
Username string `form:"username,required" json:"username,required"`
// nolint:staticcheck
Password string `form:"password,required" json:"password,required"`
}

var identityKey = "id"
Expand Down

0 comments on commit 6e425c8

Please sign in to comment.