// targetIdentify is a utility function to map a Target into
// its generated type id and a pointer to the data.
targetIdentify is a utility function to map a Target into
its generated type id and a pointer to the data.
// targetIdentify is a utility function to map a Target into // its generated type id and a pointer to the data .
func targetIdentify(x Target) (typeId e.TypeID, data e.Ptr) {
	switch t := x.(type) {
	case *ByRefType:
		typeId = e.TypeID(TargetTypeByRefType)
		data = e.Ptr(t)
	case ByValType:
		typeId = e.TypeID(TargetTypeByValType)
		data = e.Ptr(&t)
	case *ByValType:
		typeId = e.TypeID(TargetTypeByValType)
		data = e.Ptr(t)
	case *ContainerType:
		typeId = e.TypeID(TargetTypeContainerType)
		data = e.Ptr(t)
	default:
		panic(fmt.Sprintf("unhandled value of type: %T", x))
	}
	return
}
func targetIdentify ( x Target ) ( typeId e . TypeID , data e . Ptr ) { switch t := x . ( type ) { case * ByRefType : typeId = e . TypeID ( TargetTypeByRefType ) data = e . Ptr ( t ) case ByValType : typeId = e . TypeID ( TargetTypeByValType ) data = e . Ptr ( & t ) case * ByValType : typeId = e . TypeID ( TargetTypeByValType ) data = e . Ptr ( t ) case * ContainerType : typeId = e . TypeID ( TargetTypeContainerType ) data = e . Ptr ( t ) default : panic ( fmt . Sprintf ( " " , x ) ) } return }
targetIdentify is a utility function to map a Target into
its generated type id and a pointer to the data.
targetIdentify is a utility function to map a Target into its generated type id and a pointer to the data .
// The most probable reason for this is that the generated code // is out of date, or that an implementation of the Target // interface from another package is being passed in.