-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Closed
Labels
FrozenDueToAgeProposalerror-handlingLanguage & library change proposals that are about error handling.Language & library change proposals that are about error handling.
Milestone
Description
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.
Metadata
Metadata
Assignees
Labels
FrozenDueToAgeProposalerror-handlingLanguage & library change proposals that are about error handling.Language & library change proposals that are about error handling.