Quidest?

Fatalf and Errorf in Go testing

· Lorenzo Drumond

testing.Fatalf and testing.Errorf are two functions used in Go testing.

These are used when we need to mark a test case as failed.

The difference between these two is that the second one will mark a case as failed, but it will continue with the test. The first one will exit the test immediately: things are so broken that there’s no point continuing.

References

#programming #testing #golang