fix to uint
This commit is contained in:
@@ -6,23 +6,23 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
const Base1000 int64 = 1000
|
||||
const Base1024 int64 = 1024
|
||||
const Base1000 uint64 = 1000
|
||||
const Base1024 uint64 = 1024
|
||||
|
||||
var prefixesBase1000 []string = []string{"", "K", "M", "G", "T"}
|
||||
var prefixesBase1024 []string = []string{"", "Ki", "Mi", "Gi", "Ti"}
|
||||
|
||||
const KB int64 = Base1000
|
||||
const MB int64 = KB * Base1000
|
||||
const GB int64 = MB * Base1000
|
||||
const TB int64 = GB * Base1000
|
||||
const KB uint64 = Base1000
|
||||
const MB uint64 = KB * Base1000
|
||||
const GB uint64 = MB * Base1000
|
||||
const TB uint64 = GB * Base1000
|
||||
|
||||
const KiB int64 = Base1024
|
||||
const MiB int64 = KiB * Base1024
|
||||
const GiB int64 = MiB * Base1024
|
||||
const TiB int64 = GiB * Base1024
|
||||
const KiB uint64 = Base1024
|
||||
const MiB uint64 = KiB * Base1024
|
||||
const GiB uint64 = MiB * Base1024
|
||||
const TiB uint64 = GiB * Base1024
|
||||
|
||||
func FormatNumber(val int64, base int64) (string, string) {
|
||||
func FormatNumber(val uint64, base uint64) (string, string) {
|
||||
valf := float64(val)
|
||||
basef := float64(base)
|
||||
steps := 0
|
||||
|
||||
Reference in New Issue
Block a user