Hi,
Error handling in tests could be done with handle err as shown in this example.
But maybe go can use implicit default handler for a test so that every test function will have implicit error handler:
func TestFoo(t *testing.T) {
handle err { t.Fatal(err) } // implicit handler.
}
Motivation is to remove repetition of the same pattern the same as with implicit default handler for functions and methods.
Hi,
Error handling in tests could be done with
handle erras shown in this example.But maybe go can use implicit default handler for a test so that every test function will have implicit error handler:
Motivation is to remove repetition of the same pattern the same as with implicit default handler for functions and methods.