1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-22 17:10:10 +00:00

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

View File

@ -60,7 +60,12 @@ func NewLogger(out io.Writer, prefix string, flag int, color c.Attribute) (l *Lo
return l 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{}) { func (l *Logger) Printf(format string, v ...interface{}) {
if l.empty { if l.empty {