You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
cert inspection: add an option to make refresh period annotation human-readable
This option converts `time.ParseDuration`-compatible string of duration (i.e. `77h30m00s`) into
human-redable string (`3d5h30m`) so that TLS registry markdowns have improved readability
// durationToHumanReadableString formats a duration into a human-readable string.
267
+
// Unlike Go's built-in `time.Duration.String()`, which returns a string like "72h0m0s", this function returns a more concise format like "3d" or "5d4h25m".
268
+
// Implementation is based on https://github.com/gomodules/sprig/blob/master/date.go#L97-L139,
269
+
// but it doesn't round the duration to the nearest largest value but converts it precisely
270
+
// This function rounds duration to the nearest second and handles negative durations by taking the absolute value.
0 commit comments