-
Notifications
You must be signed in to change notification settings - Fork 883
feat(site): add annotation to display values of type clibase.Duration correctly #10667
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
Conversation
@@ -37,14 +39,16 @@ describe("optionValue", () => { | |||
...defaultOption, | |||
name: "Session Duration", | |||
value: 3600 * 1e9, | |||
annotations: { format_duration_ns: "falsae" }, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self-review: technically a typo but illustrates behaviour well
Value: &c.MaxTokenLifetime, | ||
Group: &deploymentGroupNetworkingHTTP, | ||
YAML: "maxTokenLifetime", | ||
Default: ((100 * 365 * time.Hour * 24) + (25 * time.Hour * 24)).String(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but what is the story with _ns
? Can't we use _ms
or will it be breaking?
It doesn't really matter what the annotation is called. I chose the |
Updated to |
format_duration_ns
to all deployment values of typeclibase.Duration
clibase.Duration
optionValue()
to check for the presence offormat_duration_ns
when displaying an option.