dustin/go-humanize

Add support for converting duration to HH:MM:SS

macnibblet opened this issue · 2 comments

Add support for converting duration to HH:MM:SS

This seems pretty similar to #48.

Can you elaborate on how this would be more useful than the default string format for a time.Duration, which has the form "72h3m0.5s"?

I needed the specific format hh:mm:ss which is archiveable via time.Time{}.Add(time.Duration(duration) * time.Second).Format("15:04:05")