fix golint issues in core/timex (#517)

This commit is contained in:
Kevin Wan
2021-02-24 16:27:11 +08:00
committed by GitHub
parent 04b0f26182
commit ef146cf5ba
4 changed files with 10 additions and 0 deletions

View File

@@ -5,6 +5,7 @@ import (
"time"
)
// ReprOfDuration returns the string representation of given duration in ms.
func ReprOfDuration(duration time.Duration) string {
return fmt.Sprintf("%.1fms", float32(duration)/float32(time.Millisecond))
}