Bad docs for testlogger
Closed this issue · 3 comments
hews commented
Docs for testlogger
suggest wrong type assertion to get back a testlogger
type:
logger/testlogger/testlogger.go
Line 34 in 2022b2f
Should be:
logger, _ := l.(*testlogger.Logger)
hews commented
Should testlogger.New return a *testlogger.Logger?
hews commented
testlogger should implement UnderlyingLogger.
should have a testlogger.MustNew(...) (logger) function.
iaburton commented
Should testlogger.New return a *testlogger.Logger?
That, and/or another function akin to NewTestLogger
that returns the concrete type. Having New do it might be fine as well, as long as it's still available from log.Open