MCPcopy
hub / github.com/livebud/bud / isNil

Function isNil

internal/is/is_internal.go:191–201  ·  view source on GitHub ↗

isNil gets whether the object is nil or not.

(object interface{})

Source from the content-addressed store, hash-verified

189
190// isNil gets whether the object is nil or not.
191func isNil(object interface{}) bool {
192 if object == nil {
193 return true
194 }
195 value := reflect.ValueOf(object)
196 kind := value.Kind()
197 if kind >= reflect.Chan && kind <= reflect.Slice && value.IsNil() {
198 return true
199 }
200 return false
201}
202
203// escapeFormatString escapes strings for use in formatted functions like Sprintf.
204func escapeFormatString(fmt string) string {

Callers 3

valWithTypeMethod · 0.85
areEqualFunction · 0.85
EqualMethod · 0.85

Calls 1

KindMethod · 0.65

Tested by

no test coverage detected