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 Prometheus duration parser #598

Merged
merged 1 commit into from
May 31, 2022

Conversation

kradalby
Copy link
Collaborator

@kradalby kradalby commented May 30, 2022

Use the duration parser from the Prometheus project, this allows us to use d, w and y.

This fixes #322

  • read the CONTRIBUTING guidelines
  • raised a GitHub issue or discussed it on the projects chat beforehand
  • added unit tests
  • added integration tests
  • updated documentation if needed
  • updated CHANGELOG.md

@kradalby kradalby marked this pull request as ready for review May 30, 2022 14:14
@kradalby kradalby requested a review from juanfont as a code owner May 30, 2022 14:14
"github.com/pterm/pterm"
"github.com/rs/zerolog/log"
"github.com/spf13/cobra"
"google.golang.org/protobuf/types/known/timestamppb"
)

const (
DefaultPreAuthKeyExpiry = 1 * time.Hour
DefaultPreAuthKeyExpiry = "1h"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ew.

@kradalby kradalby merged commit d26e220 into juanfont:main May 31, 2022
@kradalby kradalby deleted the parse-duration-improv branch May 31, 2022 07:42
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.

Unable to set expiration time for preauth key in days
2 participants