tpl/fmt: Add erroridf template func

Fixes #8613
This commit is contained in:
Bjørn Erik Pedersen
2021-06-07 16:36:48 +02:00
parent 282f1aa3db
commit f55d2f4376
19 changed files with 170 additions and 71 deletions

View File

@@ -22,6 +22,7 @@ import (
type IgnorableLogger interface {
Logger
Errorsf(statementID, format string, v ...interface{})
Apply(logger Logger) IgnorableLogger
}
type ignorableLogger struct {
@@ -55,3 +56,10 @@ ignoreErrors = [%q]`, statementID)
l.Errorf(format, v...)
}
func (l ignorableLogger) Apply(logger Logger) IgnorableLogger {
return ignorableLogger{
Logger: logger,
statements: l.statements,
}
}