This commit is contained in:
Michael Yang
2024-08-01 14:52:15 -07:00
parent 558a54b098
commit b732beba6a
68 changed files with 199 additions and 149 deletions

View File

@@ -3,6 +3,7 @@ package format
import (
"fmt"
"math"
"strconv"
)
const (
@@ -28,6 +29,6 @@ func HumanNumber(b uint64) string {
case b >= Thousand:
return fmt.Sprintf("%.0fK", float64(b)/Thousand)
default:
return fmt.Sprintf("%d", b)
return strconv.FormatUint(b, 10)
}
}