output

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 28, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Byte multiplicator for byte
	Byte = 1 << (iota * 10)

	// KiByte multiplicator for kib
	KiByte

	// MiByte multiplicator for mib
	MiByte

	// GiByte multiplicator for gib
	GiByte

	// TiByte multiplicator for tib
	TiByte

	// PiByte multiplicator for pib
	PiByte

	// EiByte multiplicator for eib
	EiByte
)
View Source
const (
	// IByte multiplicator for bytes
	IByte = 1

	// KByte multiplicator for kilo byte
	KByte = IByte * 1000

	// MByte multiplicator for mega byte
	MByte = KByte * 1000

	// GByte multiplicator for giga byte
	GByte = MByte * 1000

	// TByte multiplicator for terra byte
	TByte = GByte * 1000

	// PByte multiplicator for peta byte
	PByte = TByte * 1000

	// EByte multiplicator for exa byte
	EByte = PByte * 1000
)

Variables

This section is empty.

Functions

func AsBytes

func AsBytes(bytes uint64, decimalPlaces byte) string

AsBytes formats a given uint64 using a byte unit

func AsNumber

func AsNumber(num float64, decimalPlaces byte) string

AsNumber formats a number for better readability

func Println

func Println(data ...interface{})

Println ...

func Sprintln

func Sprintln(data ...interface{}) string

Sprintln ...

Types

type Help

type Help interface {
	Help() string
	Command() string
	Params() []HelpParam
	GetParamLen() (int, int)
}

Help ...

func NewHelp

func NewHelp(command string, help string, params ...HelpParam) Help

NewHelp ...

type HelpParam

type HelpParam struct {
	Name         string
	LongName     string
	Description  string
	DefaultValue string
	Example      string
	Required     bool
	Flag         bool
}

HelpParam ...

type Success

type Success interface {
	Success() string
}

Success ...

func NewSuccess

func NewSuccess(text string) Success

NewSuccess ...

Jump to

Keyboard shortcuts

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