Skip to content

EasyConceptErrors, testing and tooling

How do you write a unit test in Go?

What a good answer covers

Create a _test.go file with a function TestXxx(t *testing.T) and run go test. Use t.Errorf or t.Fatalf for failures.

More on Errors, testing and tooling

Flashcards for this topic