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

Function isNil

internal/testify/assert/assertions.go:684–700  ·  view source on GitHub ↗

isNil checks if a specified object is nil or not, without Failing.

(object interface{})

Source from the content-addressed store, hash-verified

682
683// isNil checks if a specified object is nil or not, without Failing.
684func isNil(object interface{}) bool {
685 if object == nil {
686 return true
687 }
688
689 value := reflect.ValueOf(object)
690 switch value.Kind() {
691 case
692 reflect.Chan, reflect.Func,
693 reflect.Interface, reflect.Map,
694 reflect.Ptr, reflect.Slice, reflect.UnsafePointer:
695
696 return value.IsNil()
697 }
698
699 return false
700}
701
702// Nil asserts that the specified object is nil.
703//

Callers 3

copyExportedFieldsFunction · 0.85
NotNilFunction · 0.85
NilFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…