datasizes

package
v0.96.0 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KiloByte = 1000                      // kB
	KibiByte = 1024                      // KiB
	MegaByte = 1000 * 1000               // MB
	MebiByte = 1024 * 1024               // MiB
	GigaByte = 1000 * 1000 * 1000        // GB
	GibiByte = 1024 * 1024 * 1024        // GiB
	TeraByte = 1000 * 1000 * 1000 * 1000 // TB
	TebiByte = 1024 * 1024 * 1024 * 1024 // TiB

	// shorthands
	KiB = KibiByte
	MB  = MegaByte
	MiB = MebiByte
	GB  = GigaByte
	GiB = GibiByte
	TiB = TebiByte
)

Variables

This section is empty.

Functions

func Parse

func Parse(size string) (uint64, error)

Parse converts a size specified as a string in KB/KiB/MB/etc. to a number of bytes represented by uint64.

Types

This section is empty.

Jump to

Keyboard shortcuts

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