utils

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const Epsilon float64 = 0.00000001

Epsilon ...

Variables

This section is empty.

Functions

func CompareArray added in v0.5.3

func CompareArray(key string, value interface{}, reqValue interface{}) (bool, error)

func Contained

func Contained(obj, target interface{}) bool

func Contains added in v0.5.2

func Contains(a []string, x string) bool

func IsEqual added in v0.1.4

func IsEqual(key string, value interface{}, reqValue interface{}) (bool, error)

IsEqual ...

func IsFloatEqual added in v0.1.4

func IsFloatEqual(a, b float64) bool

IsFloatEqual ...

func MergeGeneralMaps

func MergeGeneralMaps(maps ...map[string]interface{}) map[string]interface{}

func MergeStringMaps

func MergeStringMaps(maps ...map[string]string) map[string]string

func PathExists

func PathExists(path string) (bool, error)

func RandSeq added in v0.1.9

func RandSeq(n int, chs []rune) string

func RandSeqWithAlnum added in v0.1.9

func RandSeqWithAlnum(n int) string

func Retry added in v0.1.1

func Retry(retryNum int, desc string, silent bool, fn func(retryIdx int, lastErr error) error) error

func RvRepElement added in v0.3.0

func RvRepElement(arr []string) []string

remove redundant elements

func StructToMap added in v0.1.4

func StructToMap(structObj interface{}) (map[string]interface{}, error)

StructToMap ...

func WaitForCondition added in v0.5.1

func WaitForCondition(f func() (bool, error), interval, timeout time.Duration) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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