util

package
v0.0.52 Latest Latest
Warning

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

Go to latest
Published: May 29, 2026 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Chtimes added in v0.0.39

func Chtimes(name string, mtime time.Time) error

func CopyDir

func CopyDir(source, dest string) error

func CreateDirIfNotExist

func CreateDirIfNotExist(dir string) error

func ExpFloat64

func ExpFloat64() float64

func FileMD5

func FileMD5(filename string) (string, error)

func FileSha256 added in v0.0.47

func FileSha256(filename string) (string, error)

func FillIncrNum

func FillIncrNum(s []int, begin int, sep int) []int

func FirstNonEmpty added in v0.0.48

func FirstNonEmpty(values ...string) string

func Float32

func Float32() float32

func Float64

func Float64() float64

func Hash added in v0.0.47

func Hash(name string, src io.Reader) (string, error)

func Int

func Int() int

func Int31

func Int31() int32

func Int31n

func Int31n(n int32) int32

func Int63

func Int63() int64

func Int63n

func Int63n(n int64) int64

func Intn

func Intn(n int) int

func IsDirSame

func IsDirSame(d1 string, d2 string) error

func IsFileSame

func IsFileSame(f1 string, f2 string) error

func MD5

func MD5(src io.Reader) (string, error)

func Move added in v0.0.47

func Move(source, dest string) error

func MustFileMD5

func MustFileMD5(filename string) string

func MustFileSha256 added in v0.0.47

func MustFileSha256(filename string) string

func NormFloat64

func NormFloat64() float64

func Perm

func Perm(n int) []int

func Read

func Read(p []byte) (n int, err error)

func SafeSubStr

func SafeSubStr(raw string, left int, right int) string

func Seed

func Seed(seed int64)

func Sha256 added in v0.0.47

func Sha256(src io.Reader) (string, error)

func Shuffle

func Shuffle(n int, swap func(i int, j int))

func SplitStrRightBySize

func SplitStrRightBySize(raw string, size int) []string

func ToMap added in v0.0.47

func ToMap(v any) (map[string]any, error)

func Uint32

func Uint32() uint32

func Uint64

func Uint64() uint64

Types

This section is empty.

Jump to

Keyboard shortcuts

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