package integration import ( "io" "testing" ) var _ io.Writer = (*TestWriter)(nil) func NewTestWriter(tb testing.TB) TestWriter { return TestWriter{ TB: tb, } } type TestWriter struct { TB testing.TB } func (t TestWriter) Write(p []byte) (n int, err error) { t.TB.Log(string(p)) return len(p), nil }