bytes

package
v0.5.32 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	B   Unit = 1
	KiB      = B * 1024
	MiB      = KiB * 1024
	GiB      = MiB * 1024
)

Variables

View Source
var (
	ZeroBytes = New(0, B)
)

Functions

This section is empty.

Types

type Bytes

type Bytes struct {
	// contains filtered or unexported fields
}

func New

func New(value float64, unit Unit) Bytes

func (Bytes) Convert

func (b Bytes) Convert(unit Unit) Bytes

func (Bytes) Human

func (b Bytes) Human() Bytes

func (Bytes) String

func (b Bytes) String() string

func (Bytes) StringNoUnit

func (b Bytes) StringNoUnit() string

func (Bytes) Unit

func (b Bytes) Unit() Unit

type Unit

type Unit int

func (Unit) Format

func (u Unit) Format() string

func (Unit) String

func (u Unit) String() string

Jump to

Keyboard shortcuts

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