1
0
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:
源文雨
2022-06-11 14:03:03 +08:00
parent b60c37f627
commit 27842b6fdf

View File

@@ -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)