ptr.go raw

   1  package generic
   2  
   3  import "reflect"
   4  
   5  func indirectType(typ reflect.Type) reflect.Type {
   6  	if typ.Kind() == reflect.Ptr {
   7  		return typ.Elem()
   8  	}
   9  
  10  	return typ
  11  }
  12