util

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AnyNil

func AnyNil(values ...interface{}) bool

AnyNil return true if exists any nil value in passed params.

func AssertErrIsNil

func AssertErrIsNil(t *testing.T, err error)

AssertErrIsNil function assert that passed error be nil.

func IsNil

func IsNil(val interface{}) (result bool)

IsNil function check value is nil or no. To check real value of interface is nil or not, should using reflection, check this https://play.golang.org/p/Isoo0CcAvr. Firstly check `val==nil` because reflection can not get value of zero val.

func PanicErr

func PanicErr(err error)

PanicErr panic passed error if it's not nil.

func ToSnakeCase

func ToSnakeCase(str string) string

ToSnakeCase function convert string to snake_case

Types

This section is empty.

Jump to

Keyboard shortcuts

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