diff --git a/internal/testlog/testlog.go b/internal/testlog/testlog.go index 24015ef40a..8a3ea85438 100644 --- a/internal/testlog/testlog.go +++ b/internal/testlog/testlog.go @@ -21,9 +21,10 @@ import ( "bytes" "context" "fmt" - "github.com/ethereum/go-ethereum/log" "log/slog" "sync" + + "github.com/ethereum/go-ethereum/log" ) const ( diff --git a/internal/testlog/testlog_test.go b/internal/testlog/testlog_test.go index 06522787b2..4d7dbded72 100644 --- a/internal/testlog/testlog_test.go +++ b/internal/testlog/testlog_test.go @@ -22,7 +22,7 @@ func (t *mockT) Logf(format string, args ...any) { // we could gate this operation in a mutex, but because testlogger // only calls Logf with its internal mutex held, we just write output here var lineBuf bytes.Buffer - if _, err := fmt.Fprintf(&lineBuf, fmt.Sprintf(format, args...)); err != nil { + if _, err := fmt.Fprintf(&lineBuf, format, args...); err != nil { panic(err) } // The timestamp is locale-dependent, so we want to trim that off @@ -67,5 +67,4 @@ func TestLogging(t *testing.T) { fmt.Printf("'%s'\n", tc.expected) } } - }