unitconv

package
v0.1.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2026 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	KB uint64 = 1000
	MB        = KB * 1000
	GB        = MB * 1000
	TB        = GB * 1000
	PB        = TB * 1000
	EB        = PB * 1000
)
View Source
const (
	KiB uint64 = 1024
	MiB        = KiB * 1024
	GiB        = MiB * 1024
	TiB        = GiB * 1024
	PiB        = TiB * 1024
	EiB        = PiB * 1024
)

Variables

This section is empty.

Functions

func CGroupStringToSizeInBytes

func CGroupStringToSizeInBytes(cs string) (uint64, error)

func Minimize

func Minimize(unitName string) string

func MinimizedStringToSizeInBytes

func MinimizedStringToSizeInBytes(sz string) (uint64, error)

func NarrowSize

func NarrowSize(size uint64) (uint64, string)

func SizeInBytesToCGroupString

func SizeInBytesToCGroupString(sizeInBytes uint64) string

func SizeInBytesToMinimizedString

func SizeInBytesToMinimizedString(sizeInBytes uint64) string

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL