type testcase … func (tc testcase) run(t *testing.T) { … } // normalize replaces parts of message texts which may vary with constant strings. func normalize(msg string) string { … } type logBufferT … func (l *logBufferT) Log(args ...any) { … } func (l *logBufferT) Logf(format string, args ...any) { … }