util

package
v0.0.0-...-a9387a1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EqualInts

func EqualInts(i1, i2 []int) bool

func FillString

func FillString(s string, n int, ch string) string

func FindRuntimeStack

func FindRuntimeStack(s string) []string

func GetRuntimeStack

func GetRuntimeStack() []string

func GetRuntimeStackInfo

func GetRuntimeStackInfo() []byte

func In

func In(s string, ss []string) bool

func InInts

func InInts(a int, as []int) bool

func IntIn

func IntIn(s int, ss []int) bool

func RandChoiseInt

func RandChoiseInt(i []int) int

func RandStr

func RandStr(n int) string

func Randn

func Randn(start, end int) int

func ReadFull

func ReadFull(r io.Reader, n int) ([]byte, error)

func Shell

func Shell(s string) error

Types

type AtomicInt

type AtomicInt int32

func (*AtomicInt) Add

func (i *AtomicInt) Add(n int) int

func (*AtomicInt) Store

func (i *AtomicInt) Store(n int)

func (*AtomicInt) Val

func (i *AtomicInt) Val() int

type Size

type Size Unit

func ParseSize

func ParseSize(s string) (Size, error)

type Unit

type Unit int64
const (
	B Unit = 1 << (iota * 10)
	KB
	MB
	GB
	PB
)

func ParseUnit

func ParseUnit(s string) (Unit, error)

func (*Unit) Add

func (u *Unit) Add(n Unit)

func (Unit) String

func (u Unit) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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