bytesize

package
v0.0.0-...-ecdd364 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func String

func String(b float64, decimals int) string

String returns float64 in bytes.

Types

type ByteSize

type ByteSize float64

ByteSize is a float64.

const (

	// KB is kilobytes.
	KB ByteSize = 1 << (10 * iota)
	// MB is megabytes.
	MB
	// GB is gigabytes
	GB
	// TB is terabytes
	TB
	// PB is petabytes.
	PB
	// EB is exabytes.
	EB
	// ZB is zettabytes.
	ZB
	// YB is yottabytes.
	YB
)

func (ByteSize) String

func (b ByteSize) String(decimals int) string

Jump to

Keyboard shortcuts

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