Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Token.New example is for the wrong func #338

Open
notrobpike opened this issue Aug 15, 2023 · 2 comments
Open

Token.New example is for the wrong func #338

notrobpike opened this issue Aug 15, 2023 · 2 comments

Comments

@notrobpike
Copy link

The example for Token.New() actually demonstrates Token.NewWithClaims(). It should be demonstrating Token.New().

It additionally demonstrates signing, which I guess is ok but it seems out of scope, given that the signing example can just be part of the documentation for that method ...

@oxisto
Copy link
Collaborator

oxisto commented Aug 16, 2023

The example for Token.New() actually demonstrates Token.NewWithClaims(). It should be demonstrating Token.New().

It additionally demonstrates signing, which I guess is ok but it seems out of scope, given that the signing example can just be part of the documentation for that method ...

Which example are you exactly referring to? The ones in example_test.go use NewWithClaims, but are also named in this way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants