MCPcopy Create free account
hub / github.com/flant/shell-operator / isNil

Function isNil

pkg/task/queue/task_queue.go:1142–1155  ·  view source on GitHub ↗
(v interface{})

Source from the content-addressed store, hash-verified

1140}
1141
1142func isNil(v interface{}) bool {
1143 if v == nil {
1144 return true
1145 }
1146
1147 // Use reflection to check if the interface contains a nil concrete value
1148 rv := reflect.ValueOf(v)
1149 switch rv.Kind() {
1150 case reflect.Chan, reflect.Func, reflect.Interface, reflect.Map, reflect.Ptr, reflect.Slice:
1151 return rv.IsNil()
1152 default:
1153 return false
1154 }
1155}

Callers 2

compactionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected