Documentation ¶
Index ¶
- Variables
- func CostWith(fn func()) (dur time.Duration)
- func Count(n int) <-chan int
- func FuncSprint(args ...interface{}) string
- func Range(min, max int) int
- func RangeBytes(min, max int) []byte
- func RangeDur(min, max time.Duration) time.Duration
- func RangeString(min, max int) string
- func SliceOf(args ...interface{}) []interface{}
- func TestFuncWith(fn interface{}) *xtest
- func Tick(args ...interface{}) <-chan time.Time
- func TimeoutWith(dur time.Duration, fn func()) error
- func Try(fn func()) (e error)
- func Wrap(fn interface{}) func(...interface{}) func(...interface{}) (err error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrXTest = xerror.New("xtest error") ErrParamIsNil = ErrXTest.New("the parameter is nil") ErrFuncTimeout = ErrXTest.New("the func is timeout") ErrParamTypeNotFunc = ErrXTest.New("the type of the parameters is not func") ErrDurZero = ErrXTest.New("the duration time must more than zero") ErrInputParamsNotMatch = ErrXTest.New("the input params of func is not match") ErrInputOutputParamsNotMatch = ErrXTest.New("the input num and output num of the callback func is not match") ErrFuncOutputTypeNotMatch = ErrXTest.New("the output type of the callback func is not match") ErrForeachParameterNil = ErrXTest.New("the parameter of [Foreach] must not be nil") )
Functions ¶
func FuncSprint ¶ added in v0.1.2
func FuncSprint(args ...interface{}) string
func TestFuncWith ¶
func TestFuncWith(fn interface{}) *xtest
func TimeoutWith ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.