MCPcopy Create free account
hub / github.com/devfeel/dotweb / isNil

Function isNil

test/assert.go:58–70  ·  view source on GitHub ↗
(object interface{})

Source from the content-addressed store, hash-verified

56}
57
58func isNil(object interface{}) bool {
59 if object == nil {
60 return true
61 }
62
63 value := reflect.ValueOf(object)
64 kind := value.Kind()
65 if kind >= reflect.Chan && kind <= reflect.Slice && value.IsNil() {
66 return true
67 }
68
69 return false
70}
71
72func formattedLog(t *testing.T, fmt string, args ...interface{}) {
73 _, file, line, _ := runtime.Caller(2)

Callers 2

NilFunction · 0.85
NotNilFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected