util

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: May 8, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyDir

func CopyDir(src string, dst string) error

CopyDir copy directory from src to dst.

func CopyFile

func CopyFile(src, dst string) error

CopyFile copy a single file.

func Float64ToStr

func Float64ToStr(val float64) string

Float64ToStr Convert type float64 to string

func MemHash

func MemHash(buf []byte) uint64

MemHash is the hash function used by go map, it utilizes available hardware instructions(behaves as aeshash if aes instruction is available). NOTE: The hash seed changes for every process. So, this cannot be used as a persistent hash.

func PathExist

func PathExist(path string) bool

PathExist check if the directory or file exists.

func StrToFloat64

func StrToFloat64(val string) (float64, error)

StrToFloat64 convert type string to float64

Types

type Murmur128

type Murmur128 struct {
	// contains filtered or unexported fields
}

func NewMurmur128

func NewMurmur128() *Murmur128

func (*Murmur128) EncodeSum128

func (m *Murmur128) EncodeSum128() []byte

func (*Murmur128) Reset

func (m *Murmur128) Reset()

func (*Murmur128) Write

func (m *Murmur128) Write(p []byte) error

Jump to

Keyboard shortcuts

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