helper

package
v0.0.0-...-36277ca Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bytes2Str

func Bytes2Str(arr []byte) string

Bytes2Str 字节数组转字符串

func Equal

func Equal(expected, actual interface{}, handler func(e, a interface{}))

func EqualWithTip

func EqualWithTip(expected, actual interface{}, errorMsg string)

func IfElse

func IfElse(condition bool, ifVal interface{}, elVal interface{}) interface{}

IfElse simple if else

func IsNil

func IsNil(i interface{}) bool

func IsNotNil

func IsNotNil(i interface{}) bool

func Predicate

func Predicate(predicate func() bool, errorMsg string)

func TrimBytes2Str

func TrimBytes2Str(arr []byte) string

TrimBytes2Str 去除空字符后转字符串

func Validate

func Validate(expected, actual interface{},
	predicate func(expected, actual interface{}) bool,
	handler func(e, a interface{}))

Types

type ValidateError

type ValidateError struct {
	// contains filtered or unexported fields
}

func (ValidateError) Error

func (v ValidateError) Error() string

Directories

Path Synopsis
cli

Jump to

Keyboard shortcuts

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