mirror of
https://github.com/kubeshark/kubeshark.git
synced 2025-06-03 05:31:10 +00:00
12 lines
261 B
Go
12 lines
261 B
Go
package units
|
|
|
|
import "github.com/docker/go-units"
|
|
|
|
func BytesToHumanReadable(bytes int64) string {
|
|
return units.HumanSize(float64(bytes))
|
|
}
|
|
|
|
func HumanReadableToBytes(humanReadableSize string) (int64, error) {
|
|
return units.FromHumanSize(humanReadableSize)
|
|
}
|