Files
kubeshark/shared/human_data_sizes.go
2021-07-13 16:21:32 +03:00

12 lines
262 B
Go

package shared
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)
}