don't show docs for human
This commit is contained in:
parent
60d7f3a1f3
commit
561fc4300f
@ -114,7 +114,7 @@ func (b *BPS) Rate() float64 {
|
||||
|
||||
// HumanRate returns a human-friendly (e.g. 23.3MB/s) rate.
|
||||
func (b *BPS) HumanRate() string {
|
||||
return Bytes(uint64(b.Rate())) + "/s"
|
||||
return human(uint64(b.Rate())) + "/s"
|
||||
}
|
||||
|
||||
// Close cleans up and shuts down a BPS.
|
||||
|
2
bytes.go
2
bytes.go
@ -51,7 +51,7 @@ func humanateBytes(s uint64, base float64, sizes []string) string {
|
||||
// Bytes produces a human readable representation of an SI size.
|
||||
//
|
||||
// Bytes(82854982) -> 83MB
|
||||
func Bytes(s uint64) string {
|
||||
func human(s uint64) string {
|
||||
sizes := []string{"B", "kB", "MB", "GB", "TB", "PB", "EB"}
|
||||
return humanateBytes(s, 1000, sizes)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user