Return value in Nil if not nil
This commit is contained in:
parent
34643d9853
commit
4d3d17dd62
@ -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...)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user