When I tried to use an instance of LoggerMock as a ctxd.Logger, I get the following error:
Cannot use 'l' (type LoggerMock) as the type ctxd.Logger Type does not implement 'ctxd.Logger' as the 'Debug' method has a pointer receiver
import "github.com/bool64/ctxd"
type Server struct {
log ctxd.Logger
}
func NewServer(log ctxd.Logger) *Server {
return &Server{log: log}
}
l := ctxd.LoggerMock{}
s := NewServer(l)