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

Add day suffix support to ParseDurationSecond #13

Merged
merged 4 commits into from
Oct 27, 2021
Merged

Add day suffix support to ParseDurationSecond #13

merged 4 commits into from
Oct 27, 2021

Conversation

kalafut
Copy link
Contributor

@kalafut kalafut commented Oct 21, 2021

Add support for a "d" suffix that corresponds to 24 hours. Also add more test cases and slightly refactor the code.

This type of support has been requested and rejected by the Go team (golang/go#11473). Their push back was around "how long is a day?", but for our users I think defining a day as 24 hours is fine, and convenient for longer duration TTLs, e.g. root keys that are valid for 90 days.

Add support for a "d" suffix that corresponds to 24 hours. Also add
more test cases and slightly refactor the code.
parseutil/parseutil.go Outdated Show resolved Hide resolved
parseutil/parseutil.go Outdated Show resolved Hide resolved
parseutil/parseutil.go Outdated Show resolved Hide resolved
jasonodonnell
jasonodonnell previously approved these changes Oct 21, 2021
ncabatoff
ncabatoff previously approved these changes Oct 21, 2021
@kalafut kalafut dismissed stale reviews from ncabatoff and jasonodonnell via 999a66d October 21, 2021 15:54
@kalafut kalafut requested a review from calvn October 26, 2021 13:20
@calvn calvn merged commit 39924fb into main Oct 27, 2021
@calvn calvn deleted the day-duration branch October 27, 2021 17:36
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

4 participants