MCPcopy Index your code
hub / github.com/FunctionStream/function-stream / IsNil

Function IsNil

admin/client/utils.go:332–343  ·  view source on GitHub ↗

IsNil checks if an input is nil

(i interface{})

Source from the content-addressed store, hash-verified

330
331// IsNil checks if an input is nil
332func IsNil(i interface{}) bool {
333 if i == nil {
334 return true
335 }
336 switch reflect.TypeOf(i).Kind() {
337 case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Interface, reflect.Slice:
338 return reflect.ValueOf(i).IsNil()
339 case reflect.Array:
340 return reflect.ValueOf(i).IsZero()
341 }
342 return false
343}
344
345type MappedNullable interface {
346 ToMap() (map[string]interface{}, error)

Callers 15

GetConfigMethod · 0.85
GetConfigOkMethod · 0.85
HasConfigMethod · 0.85
GetNamespaceMethod · 0.85
GetNamespaceOkMethod · 0.85
HasNamespaceMethod · 0.85
ToMapMethod · 0.85
GetConfigMethod · 0.85
GetConfigOkMethod · 0.85
HasConfigMethod · 0.85
ToMapMethod · 0.85
GetConfigMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected