xutil

package
v0.3.22 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2021 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Default

func Default(t, f interface{}) interface{}

func If

func If(check bool, a, b interface{}) interface{}

If exported

func IsZero

func IsZero(val interface{}) bool

IsZero

func ToBytes added in v0.3.12

func ToBytes(str string) []byte

#nosec G103 ToBytes returns a byte pointer without allocation

func ToStr added in v0.3.12

func ToStr(bytes []byte) string

#nosec G103 ToStr returns a string pointer without allocation

func Try

func Try(fn interface{}, args ...interface{}) (gErr error)

func TryCatch added in v0.3.12

func TryCatch(fn func(), catch ...func(err error))

func TryWith added in v0.3.12

func TryWith(gErr *error, fn interface{}, args ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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