ufmt

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: MIT Imports: 7 Imported by: 7

Documentation

Index

Constants

View Source
const IntPrefix = "KMGTPE"

Variables

This section is empty.

Functions

func BitSize added in v0.1.1

func BitSize[V umath.AnyInt](v V) string

func BitSizeDense added in v0.1.1

func BitSizeDense[V umath.AnyInt](v V) string

func BitSpeed added in v0.1.1

func BitSpeed[V umath.AnyInt](v V) string

func BitSpeedDense added in v0.1.1

func BitSpeedDense[V umath.AnyInt](v V) string

func Bool

func Bool(v bool, yes, no string) string

func ByteSize added in v0.1.1

func ByteSize[V umath.AnyInt](v V) string

func ByteSizeDense added in v0.1.1

func ByteSizeDense[V umath.AnyInt](v V) string

func ByteSpeed added in v0.1.1

func ByteSpeed[V umath.AnyInt](v V) string

func ByteSpeedDense added in v0.1.1

func ByteSpeedDense[V umath.AnyInt](v V) string

func EnableDisable

func EnableDisable(v bool) string

func Hex

func Hex(buf []byte) string

func Int added in v0.1.1

func Int[V umath.AnyInt](v V, ctx IntCtx) string

func Join

func Join(v ...any) string

func JoinWith

func JoinWith(splitter string, v ...any) string

func OnOff

func OnOff(v bool) string

func Print

func Print(v ...any)

func Printf

func Printf(format string, v ...any)

func WideInt added in v0.1.1

func WideInt[V umath.AnyInt](v V) string

func YesNo

func YesNo(v bool) string

Types

type IntCtx added in v0.1.1

type IntCtx struct {
	Base          any
	Precision     any
	FixFractional bool
	MinLevel      any
	MaxLevel      any
	Dense         bool
	Name          string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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