代码拉取完成,页面将自动刷新
package actor
func makeReceiverMiddlewareChain(receiverMiddleware []ReceiverMiddleware, lastReceiver ReceiverFunc) ReceiverFunc {
if len(receiverMiddleware) == 0 {
return nil
}
h := receiverMiddleware[len(receiverMiddleware)-1](lastReceiver)
for i := len(receiverMiddleware) - 2; i >= 0; i-- {
h = receiverMiddleware[i](h)
}
return h
}
func makeSenderMiddlewareChain(senderMiddleware []SenderMiddleware, lastSender SenderFunc) SenderFunc {
if len(senderMiddleware) == 0 {
return nil
}
h := senderMiddleware[len(senderMiddleware)-1](lastSender)
for i := len(senderMiddleware) - 2; i >= 0; i-- {
h = senderMiddleware[i](h)
}
return h
}
func makeContextDecoratorChain(decorator []ContextDecorator, lastDecorator ContextDecoratorFunc) ContextDecoratorFunc {
if len(decorator) == 0 {
return nil
}
h := decorator[len(decorator)-1](lastDecorator)
for i := len(decorator) - 2; i >= 0; i-- {
h = decorator[i](h)
}
return h
}
func makeSpawnMiddlewareChain(spawnMiddleware []SpawnMiddleware, lastSpawn SpawnFunc) SpawnFunc {
if len(spawnMiddleware) == 0 {
return nil
}
h := spawnMiddleware[len(spawnMiddleware)-1](lastSpawn)
for i := len(spawnMiddleware) - 2; i >= 0; i-- {
h = spawnMiddleware[i](h)
}
return h
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。