MCPcopy Index your code
hub / github.com/expr-lang/expr / NotNil

Function NotNil

internal/testify/assert/assertions.go:673–681  ·  view source on GitHub ↗

NotNil asserts that the specified object is not nil. assert.NotNil(t, err)

(t TestingT, object interface{}, msgAndArgs ...interface{})

Source from the content-addressed store, hash-verified

671//
672// assert.NotNil(t, err)
673func NotNil(t TestingT, object interface{}, msgAndArgs ...interface{}) bool {
674 if !isNil(object) {
675 return true
676 }
677 if h, ok := t.(tHelper); ok {
678 h.Helper()
679 }
680 return Fail(t, "Expected value not to be nil.", msgAndArgs...)
681}
682
683// isNil checks if a specified object is nil or not, without Failing.
684func isNil(object interface{}) bool {

Callers 8

TestIssue584Function · 0.92
TestUnsafePointersFunction · 0.92
NotNilFunction · 0.92
NotNilfFunction · 0.70
TestNotNilFunction · 0.70
BenchmarkNotNilFunction · 0.70
NotNilMethod · 0.70

Calls 3

isNilFunction · 0.85
FailFunction · 0.70
HelperMethod · 0.45

Tested by 5

TestIssue584Function · 0.74
TestUnsafePointersFunction · 0.74
TestNotNilFunction · 0.56
BenchmarkNotNilFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…