vRp.CD2g_test/utils/timer/options.go

11 lines
227 B
Go

package timer
type Option func(ticker *Ticker)
// WithCaller 通过其他的 handle 执行 Caller
func WithCaller(handle func(name string, caller func())) Option {
return func(ticker *Ticker) {
ticker.handle = handle
}
}