(name string, fn func(*DB))
| 240 | } |
| 241 | |
| 242 | func (c *callback) Replace(name string, fn func(*DB)) error { |
| 243 | c.processor.db.Logger.Info(context.Background(), "replacing callback `%s` from %s\n", name, utils.FileWithLineNum()) |
| 244 | c.name = name |
| 245 | c.handler = fn |
| 246 | c.replace = true |
| 247 | c.processor.callbacks = append(c.processor.callbacks, c) |
| 248 | return c.processor.compile() |
| 249 | } |
| 250 | |
| 251 | // getRIndex get right index from string slice |
| 252 | func getRIndex(strs []string, str string) int { |
nothing calls this directly
no test coverage detected