Testify's library comes with two flavors: assert and require. be is essentially just assert, which is reasonable given the design goal of having a low footprint.
But, if we need to require, you could return a bool from each method to indicate success/failure, and then we could do:
if !be.Err(t, err, nil) {
t.FailNow()
}
In this case, we can ignore the return if we don't need it, or check it if we do.
Testify's library comes with two flavors:
assertandrequire.beis essentially justassert, which is reasonable given the design goal of having a low footprint.But, if we need to require, you could return a bool from each method to indicate success/failure, and then we could do:
In this case, we can ignore the return if we don't need it, or check it if we do.