diff --git a/helpers.go b/helpers.go index 2bb0615..3fab64b 100644 --- a/helpers.go +++ b/helpers.go @@ -9,9 +9,9 @@ import ( "time" ) -type voidWriter struct{} +type VoidLogger struct{} -func (v voidWriter) Write(p []byte) (n int, err error) { return len(p), nil } +func (v VoidLogger) Write(p []byte) (n int, err error) { return len(p), nil } var neverGonnaHappen = time.Hour * 24 * 365 * 100 diff --git a/helpers_test.go b/helpers_test.go index 0648842..7eef96f 100644 --- a/helpers_test.go +++ b/helpers_test.go @@ -60,7 +60,7 @@ func newTermTest(t *testing.T, cmd *exec.Cmd, logging bool, opts ...SetOpt) *Ter tt, err := New(cmd, append(opts, func(o *Opts) error { o = newTestOpts(o, t) if !logging { - o.Logger = log.New(voidWriter{}, "TermTest: ", log.LstdFlags) + o.Logger = log.New(VoidLogger{}, "TermTest: ", log.LstdFlags) } return nil }, OptTestErrorHandler(t))...) diff --git a/termtest.go b/termtest.go index 929cea5..151918c 100644 --- a/termtest.go +++ b/termtest.go @@ -50,7 +50,7 @@ const DefaultRows = 10 func NewOpts() *Opts { return &Opts{ - Logger: log.New(voidWriter{}, "TermTest: ", log.LstdFlags|log.Lshortfile), + Logger: log.New(VoidLogger{}, "TermTest: ", log.LstdFlags|log.Lshortfile), ExpectErrorHandler: func(_ *TermTest, err error) error { panic(err) },