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

Use time.Duration for MaxAge #126

Closed
wants to merge 1 commit into from
Closed

Conversation

pencil
Copy link

@pencil pencil commented Jan 25, 2022

Go has a dedicated type to express a duration: time.Duration. Using it simplifies the interface as it doesn't require reading up on what unit to use for the MaxAge parameter.

This change breaks backwards compatibility but it's trivial to fix (i.e. just add * time.Second to the previous configuration value). Ultimately up to you to decide if it's worth the minor inconvenience it will cause for users updating the library.

@rs
Copy link
Owner

rs commented Jan 25, 2022

The upside is too low to break the compat.

@rs rs closed this Jan 25, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants