注册加载后回调(用于构建数据)
(h func(*Table) error)
| 87 | |
| 88 | // 注册加载后回调(用于构建数据) |
| 89 | func (self *Table) RegisterPostEntry(h func(*Table) error) { |
| 90 | |
| 91 | if h == nil { |
| 92 | panic("empty postload handler") |
| 93 | } |
| 94 | |
| 95 | self.postHandlers = append(self.postHandlers, h) |
| 96 | } |
| 97 | |
| 98 | // 注册加载前回调(用于清除数据) |
| 99 | func (self *Table) RegisterPreEntry(h func(*Table) error) { |