Documentation ¶
Index ¶
- func Break()
- func CallerName(skip int) string
- func CancelCtx() (ctx context.Context, cancel context.CancelFunc)
- func CostWith(fn func()) time.Duration
- func Count(n int) <-chan int
- func Delay(dur time.Duration, fn func()) error
- func FnName(i interface{}) string
- func Go(fn func(ctx context.Context)) context.CancelFunc
- func GoDelay(fn func(), dur ...time.Duration)
- func GoLoop(fn func(ctx Ctx)) context.CancelFunc
- func Loop(fn func(i int)) error
- func MemStatsPrint()
- func ObjectName(i interface{}) string
- func Tick(fn func(ctx Ctx), interval ...time.Duration) context.CancelFunc
- func Timeout(dur time.Duration, fn func()) error
- func Wrap(fn interface{}) func(...interface{}) func(...interface{})
- func WrapRaw(fn interface{}) func(...interface{}) []reflect.Value
- func WrapReflect(fn interface{}) func(...reflect.Value) []reflect.Value
- func WrapValue(fn interface{}, args ...interface{}) []reflect.Value
- type Ctx
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GoLoop ¶
func GoLoop(fn func(ctx Ctx)) context.CancelFunc
GoLoop 启动一个goroutine loop 是为了替换 `go func() {for{ }}()` 这类的代码
func MemStatsPrint ¶
func MemStatsPrint()
Types ¶
Click to show internal directories.
Click to hide internal directories.