util

package
v0.0.0-...-49fce9b Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2024 License: BSD-2-Clause Imports: 8 Imported by: 0

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

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

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