util

package
v1.2.15 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2024 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BytesToStr

func BytesToStr(b []byte) string

BytesToStr hacks []byte to string

func BytesToValue added in v1.2.15

func BytesToValue(codec acodec.Codec, data []byte, v interface{}) error

BytesToValue converts []byte to values

func Recover

func Recover()

Recover handles panic and logs stack info

func Safe

func Safe(call func())

Safe wraps a function-calling with panic recovery

func StrToBytes

func StrToBytes(s string) []byte

StrToBytes hacks string to []byte

func ValueToBytes

func ValueToBytes(codec acodec.Codec, v interface{}) []byte

ValueToBytes converts values to []byte

Types

type Empty

type Empty struct{}

Empty struct

Jump to

Keyboard shortcuts

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