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
I propose that time.Duration.Strings() should omit zero units.
For example
fmt.Println((5*time.Hour).String())
With this proposal, this example result will change from 5h0m0s to 5h.
It's more concise. Zero units like 0m0s is meaningless.
Currently, we already omit the ns, µs and ms units if its value is zero, so we should also emit the s and h unit to keep the String() behavior more consistent and predictable.