sizeunit

package
Version: v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormatToLongString

func FormatToLongString(size int, sizeUnit SizeUnit) string

func FormatToShortString

func FormatToShortString(size int, sizeUnit SizeUnit) string

Types

type SizeUnit

type SizeUnit int64
const (
	KB SizeUnit = 1 << (10 * (iota + 1))
	MB
	GB
)

func ConvertTo

func ConvertTo(size int, oldSizeUnit SizeUnit, newSizeUnit SizeUnit) (newSize int, newUnit SizeUnit)

Source Files

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL