File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -294,12 +294,22 @@ func (f *FailureError) backtrace() {
294
294
var ErrFailure error = FailureError {}
295
295
296
296
// ExpectNoError checks if "err" is set, and if so, fails assertion while logging the error.
297
+ //
298
+ // As in [gomega.Expect], the explain parameters can be used to provide
299
+ // additional information in case of a failure in one of these two ways:
300
+ // - A single string is used as first line of the failure message directly.
301
+ // - A string with additional parameters is passed through [fmt.Sprintf].
297
302
func ExpectNoError (err error , explain ... interface {}) {
298
303
ExpectNoErrorWithOffset (1 , err , explain ... )
299
304
}
300
305
301
306
// ExpectNoErrorWithOffset checks if "err" is set, and if so, fails assertion while logging the error at "offset" levels above its caller
302
307
// (for example, for call chain f -> g -> ExpectNoErrorWithOffset(1, ...) error would be logged for "f").
308
+ //
309
+ // As in [gomega.Expect], the explain parameters can be used to provide
310
+ // additional information in case of a failure in one of these two ways:
311
+ // - A single string is used as first line of the failure message directly.
312
+ // - A string with additional parameters is passed through [fmt.Sprintf].
303
313
func ExpectNoErrorWithOffset (offset int , err error , explain ... interface {}) {
304
314
if err == nil {
305
315
return
You can’t perform that action at this time.
0 commit comments