mirror of
https://github.com/fumiama/ReiBot.git
synced 2026-06-11 05:30:38 +08:00
rename single new
This commit is contained in:
@@ -28,8 +28,8 @@ func WithPostFn[K comparable](fn func(ctx *Ctx)) Option[K] {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// New 创建反并发中间件
|
// NewSingle 创建反并发中间件
|
||||||
func New[K comparable](op ...Option[K]) *Single[K] {
|
func NewSingle[K comparable](op ...Option[K]) *Single[K] {
|
||||||
s := Single[K]{}
|
s := Single[K]{}
|
||||||
for _, option := range op {
|
for _, option := range op {
|
||||||
option(&s)
|
option(&s)
|
||||||
|
|||||||
Reference in New Issue
Block a user