unit

package
v2.1.26 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	B  Bytes = 1
	KB       = 1024 * B
	MB       = 1024 * KB
	GB       = 1024 * MB
	TB       = 1024 * GB
	PB       = 1024 * TB
	EB       = 1024 * PB
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bytes

type Bytes int64

func ToBytes

func ToBytes(size int64) Bytes

func (Bytes) MarshalYAML

func (f Bytes) MarshalYAML() (any, error)

func (*Bytes) Set

func (f *Bytes) Set(s string) (err error)

Set is used for command flag var

func (Bytes) String

func (f Bytes) String() string

func (Bytes) ToNumber

func (f Bytes) ToNumber() int64

func (Bytes) Type

func (f Bytes) Type() string

func (*Bytes) UnmarshalJSON

func (f *Bytes) UnmarshalJSON(b []byte) error

func (*Bytes) UnmarshalYAML

func (f *Bytes) UnmarshalYAML(node *yaml.Node) error

Jump to

Keyboard shortcuts

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