Update two more places

This commit is contained in:
Emir Beganović 2019-05-08 10:26:49 +04:00 committed by GitHub
parent 8b127471f1
commit bb3c74467d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -123,7 +123,7 @@ func (cp *CallbackProcessor) Remove(callbackName string) {
// scope.SetColumn("Updated", now) // scope.SetColumn("Updated", now)
// }) // })
func (cp *CallbackProcessor) Replace(callbackName string, callback func(scope *Scope)) { func (cp *CallbackProcessor) Replace(callbackName string, callback func(scope *Scope)) {
log.Printf("[info] replacing callback `%v` from %v\n", callbackName, fileWithLineNum()) cp.logger.Printf("[info] replacing callback `%v` from %v\n", callbackName, fileWithLineNum())
cp.name = callbackName cp.name = callbackName
cp.processor = &callback cp.processor = &callback
cp.replace = true cp.replace = true
@ -162,7 +162,7 @@ func sortProcessors(cps []*CallbackProcessor) []*func(scope *Scope) {
for _, cp := range cps { for _, cp := range cps {
// show warning message the callback name already exists // show warning message the callback name already exists
if index := getRIndex(allNames, cp.name); index > -1 && !cp.replace && !cp.remove { if index := getRIndex(allNames, cp.name); index > -1 && !cp.replace && !cp.remove {
log.Printf("[warning] duplicated callback `%v` from %v\n", cp.name, fileWithLineNum()) cp.logger.Printf("[warning] duplicated callback `%v` from %v\n", cp.name, fileWithLineNum())
} }
allNames = append(allNames, cp.name) allNames = append(allNames, cp.name)
} }