fix NewEmptyLogger

for #151.
Dumb bug, I really need unit tests.
This commit is contained in:
Harvey Tindall 2021-10-03 15:59:58 +01:00
parent b29c24a405
commit a220ba8dfb
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
1 changed files with 6 additions and 1 deletions

View File

@ -60,7 +60,12 @@ func NewLogger(out io.Writer, prefix string, flag int, color c.Attribute) (l *Lo
return l
}
func NewEmptyLogger() (l *Logger) { l.empty = true; return }
func NewEmptyLogger() (l *Logger) {
l = &Logger{
empty: true,
}
return
}
func (l *Logger) Printf(format string, v ...interface{}) {
if l.empty {