Skip to content

Commit

Permalink
Replace interface{} with any
Browse files Browse the repository at this point in the history
  • Loading branch information
masih committed Dec 1, 2023
1 parent 19ffd98 commit cec82f0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func main() {
fmt.Printf("Generated JWT token:\n %s\n", signedToken)

// Verify the generated token
parsedToken, err := jwt.Parse(signedToken, func(_ *jwt.Token) (interface{}, error) {
parsedToken, err := jwt.Parse(signedToken, func(_ *jwt.Token) (any, error) {
return addr, nil
}, jwt.WithValidMethods([]string{filjwt.SingingMethodES256KR.Alg()}))
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func ExampleSingingMethodES256KR() {
fmt.Printf("Generated JWT token:\n %s\n", signedToken)

// Verify the generated token
parsedToken, err := jwt.Parse(signedToken, func(_ *jwt.Token) (interface{}, error) {
parsedToken, err := jwt.Parse(signedToken, func(_ *jwt.Token) (any, error) {
return addr, nil
}, jwt.WithValidMethods([]string{filjwt.SingingMethodES256KR.Alg()}))
if err != nil {
Expand Down

0 comments on commit cec82f0

Please sign in to comment.