xutil

package
v0.3.11 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2021 License: MIT Imports: 3 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CopyBytes

func CopyBytes(b []byte) []byte

CopyBytes copies a slice to make it immutable

func CopyString

func CopyString(s string) string

CopyString copies a string to make it immutable

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 Try

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

func UnsafeBytes

func UnsafeBytes(s string) (bs []byte)

#nosec G103 GetBytes returns a byte pointer without allocation

func UnsafeString

func UnsafeString(b []byte) string

#nosec G103 GetString returns a string pointer without allocation

Types

This section is empty.

Jump to

Keyboard shortcuts

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