Help us shape the future of Go! Take the 2026 Go Developer Survey

unitutil

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Sep 26, 2026 License: Apache-2.0 Imports: 0 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KB int64 = 1024
	MB       = KB * 1024
	GB       = MB * 1024
	TB       = GB * 1024
	PB       = TB * 1024
	EB       = PB * 1024
)

Functions

func AmountString

func AmountString(size int64) (int64, string)

AmountString returns a string representation of the amount with an amount suffix corresponding to the nearest kibibit.

For example, AmountString(1022) == "1022). AmountString(1024) == "1KB", etc

Types

This section is empty.

Jump to

Keyboard shortcuts

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