Fix messages for remove, replace callbacks

This commit is contained in:
Jinzhu 2014-09-02 20:13:00 +08:00
parent 59846f0e9b
commit 58ff124210
1 changed files with 2 additions and 2 deletions

View File

@ -66,14 +66,14 @@ func (cp *callback_processor) Register(name string, fc func(scope *Scope)) {
} }
func (cp *callback_processor) Remove(name string) { func (cp *callback_processor) Remove(name string) {
fmt.Printf("[info] removing callback `%v` from %v\n", cp.name, fileWithLineNum()) fmt.Printf("[info] removing callback `%v` from %v\n", name, fileWithLineNum())
cp.name = name cp.name = name
cp.remove = true cp.remove = true
cp.callback.sort() cp.callback.sort()
} }
func (cp *callback_processor) Replace(name string, fc func(scope *Scope)) { func (cp *callback_processor) Replace(name string, fc func(scope *Scope)) {
fmt.Printf("[info] replacing callback `%v` from %v\n", cp.name, fileWithLineNum()) fmt.Printf("[info] replacing callback `%v` from %v\n", name, fileWithLineNum())
cp.name = name cp.name = name
cp.processor = &fc cp.processor = &fc
cp.replace = true cp.replace = true