-
-
Notifications
You must be signed in to change notification settings - Fork 45
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
Options should use time values, but not pointer #18
Comments
Yup. Typically However, currently in this project they're all stored as pointers. This is because the presence of the If you've come across an instance where the code follows a pointer reference where it's possible it could be |
Imho we could test zero duration
|
The obvious (but not mentioned) problem with pointer values is that it prevents use of struct literal to init options like: jwks, err := keyfunc.Get(url, keyfunc.Options{
RefreshInterval: 1 * time.Minute,
}) |
Time package documentation advises to use values, but not pointers.
https://github.com/golang/go/blob/master/src/time/time.go#L85-L87
keyfunc/options.go
Line 42 in 3dcaab5
The text was updated successfully, but these errors were encountered: