d2/lib/log/tbhandler.go
2024-10-04 15:58:44 -06:00

15 lines
191 B
Go

package log
import (
"testing"
)
type tbWriter struct {
tb testing.TB
}
func (w *tbWriter) Write(p []byte) (n int, err error) {
w.tb.Helper()
w.tb.Log(string(p))
return len(p), nil
}