util

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2024 License: BSD-2-Clause Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes

func Bytes(s string) []byte

Bytes converts string to byte slice.

func MergeMap added in v1.1.3

func MergeMap[K comparable, V any](maps ...map[K]V) map[K]V

MergeMap merge maps, next key will overwrite previous key.

func String

func String(b []byte) string

String converts byte slice to string.

func WithRecover

func WithRecover(fn func())

Types

type SafeRand

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

func NewSafeRand

func NewSafeRand() *SafeRand

func (*SafeRand) Int63n

func (r *SafeRand) Int63n(n int64) int64

func (*SafeRand) RandN added in v1.1.1

func (r *SafeRand) RandN(n int) string

Jump to

Keyboard shortcuts

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