From 4d3d17dd6211a6f856d88ca34aa255abb31f08bf Mon Sep 17 00:00:00 2001 From: NiseVoid Date: Wed, 17 Apr 2019 11:14:06 +0200 Subject: [PATCH] Return value in Nil if not nil --- assert.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assert.go b/assert.go index c8c1675..4657f2d 100644 --- a/assert.go +++ b/assert.go @@ -65,7 +65,7 @@ func isNil(val interface{}) bool { // Nil asserts the given value is nil func (a Assert) Nil(actual interface{}, msg ...interface{}) { t(a).Helper() - msg = prepMsg(msg, `Should be nil, but it isn't`) + msg = prepMsg(msg, `Should be nil, but got %#v`, actual) a(isNil(actual), msg...) }