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

     1  package reflectinternal
     2  
     3  import "reflect"
     4  
     5  func ReflectInterfaceVal(any interface{}) interface{} {
     6  	rVal := reflect.ValueOf(any)
     7  
     8  	if rVal.Kind() == reflect.Ptr {
     9  		rVal = rVal.Elem()
    10  	}
    11  
    12  	return rVal.Interface()
    13  }