责任链
(data *ActionInfo, actions ...Action)
| 17 | |
| 18 | // 责任链 |
| 19 | func chain(data *ActionInfo, actions ...Action) bool { |
| 20 | for _, v := range actions { |
| 21 | if !v.Execute(data) { |
| 22 | return false |
| 23 | } |
| 24 | } |
| 25 | return true |
| 26 | } |
| 27 | |
| 28 | type MessageHandler struct { |
| 29 | sessionCache services.SessionServiceCacheInterface |
no test coverage detected