util

package
v4.0.7 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 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 returns true if any of the passed in parameters are nil, and returns false otherwise.

func AssertErrIsNil

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

AssertErrIsNil function assert that the passed-in error is nil.

func IsNil

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

IsNil function determines whether the parameter is nil or not. If the value itself is not nil, reflection is used to determine whether the underlying value is nil. See https://play.golang.org/p/Isoo0CcAvr for an example.

func PanicErr

func PanicErr(err error)

PanicErr panics using the passed-in error if it's not nil.

func ToSnakeCase

func ToSnakeCase(str string) string

ToSnakeCase returns snake_case of the provided value.

Types

This section is empty.

Jump to

Keyboard shortcuts

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