gitlab.com/evatix-go/core@v1.3.55/internal/reflectinternal/IsNullUsingReflectValue.go (about)

     1  package reflectinternal
     2  
     3  import "reflect"
     4  
     5  func IsNullUsingReflectValue(rv reflect.Value) bool {
     6  	switch rv.Kind() {
     7  	case reflect.Chan, reflect.Func, reflect.Map, reflect.Ptr, reflect.UnsafePointer, reflect.Slice:
     8  		return rv.IsNil()
     9  	default:
    10  		return false
    11  	}
    12  }