utils

package
v0.1.208 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateUnqueServiceName

func GenerateUnqueServiceName(prepend string) string

func IsEmptyOrNil added in v0.1.188

func IsEmptyOrNil(i interface{}) bool

IsEmptyOrNil checks if a value is empty or nil, useful for strings and arrays

func IsNil added in v0.1.188

func IsNil(i interface{}) bool

IsNil is a wholistic nil checker

func IsZero added in v0.1.188

func IsZero(v reflect.Value) bool

IsZero : determine is zero value 1. string => empty string 2. bool => false 3. function => nil 4. map => nil (uninitialized map) 5. slice => nil (uninitialized slice)

func RandomString

func RandomString(n int) string

Types

type Zeroer added in v0.1.188

type Zeroer interface {
	IsZero() bool
}

Zeroer :

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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