util

package
v0.0.0-...-c68f7f2 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: MIT Imports: 12 Imported by: 14

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assert

func Assert(cond bool, msg string)

func FindUInt64s

func FindUInt64s(a []uint64, x uint64) int

func FormatFloat64

func FormatFloat64(v float64) string

func InInts

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

func InSortedStrings

func InSortedStrings(v string, a []string) bool

func InStrings

func InStrings(v string, a []string) bool

func MaxUInt64

func MaxUInt64(a, b uint64) uint64

func Mean

func Mean(values []float64) float64

func MinUInt64

func MinUInt64(a, b uint64) uint64

func NanoTick

func NanoTick() uint64

func NewIncrementStd

func NewIncrementStd() *_IncrementStd

func PanicTrace

func PanicTrace(kb int) []byte

func Production

func Production(args ...[]float64) [][]float64

func ProductionString

func ProductionString(args ...[]string) [][]string

func Round

func Round(val float64, places int) float64

func SearchUInt64s

func SearchUInt64s(a []uint64, x uint64) int

func Std

func Std(values []float64) float64

func Sum

func Sum(values []float64) float64

func Tick

func Tick() uint64

func TrimFloatStringZero

func TrimFloatStringZero(s string) string

func UnreachableCode

func UnreachableCode()

func UnzipFile

func UnzipFile(fileName string, outputDir string) error

func ZlibCompress

func ZlibCompress(src []byte) []byte

进行zlib压缩

func ZlibUnCompress

func ZlibUnCompress(compressSrc []byte) ([]byte, error)

进行zlib解压缩

Types

type RingBuffer

type RingBuffer struct {
	Buffer []interface{}

	Top    int
	Length int
}

func NewRingBuffer

func NewRingBuffer(size int) *RingBuffer

func (*RingBuffer) Append

func (this *RingBuffer) Append(v interface{})

func (*RingBuffer) Clone

func (this *RingBuffer) Clone() *RingBuffer

func (*RingBuffer) Get

func (this *RingBuffer) Get(index int) interface{}

func (*RingBuffer) GetLength

func (this *RingBuffer) GetLength() int

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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