Skip to content

Glossary: Go Basics

t.Errorf and t.Fatalf

Also written: t.Errorf, t.Fatalf, got and want

Methods on `t *testing.T` that report a failed check. `t.Errorf` marks the test failed and carries on, while `t.Fatalf` fails and stops the test at once.

Where the book teaches it