MCPcopy Create free account
hub / github.com/imroc/req / isNil

Function isNil

internal/tests/assert.go:101–111  ·  view source on GitHub ↗
(v any)

Source from the content-addressed store, hash-verified

99}
100
101func isNil(v any) bool {
102 if v == nil {
103 return true
104 }
105 rv := reflect.ValueOf(v)
106 kind := rv.Kind()
107 if kind >= reflect.Chan && kind <= reflect.Slice && rv.IsNil() {
108 return true
109 }
110 return false
111}

Callers 2

AssertIsNilFunction · 0.85
AssertNotNilFunction · 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…