@Override
	public DataType recoverDataType(GoTypeManager goTypes) throws IOException {
		Structure genericSliceDT = programContext.getGoTypes().getGenericSliceDT();

		StructureDataType sliceDT =
			new StructureDataType(goTypes.getCP(this), goTypes.getTypeName(this),
				genericSliceDT.getLength(), goTypes.getDTM());

		// ensure the sliceDT is filled out before getting the element's data type to ensure
		// any other data types pulled in that ref this slice don't change size when trying to
		// enable packing
		sliceDT.replaceWith(genericSliceDT);

		goTypes.cacheRecoveredDataType(this, sliceDT);

		// fixup the generic void* field with the specific element* type
		GoType elementType = getElement();
		DataType elementDT = goTypes.getGhidraDataType(elementType);
		Pointer elementPtrDT = goTypes.getDTM().getPointer(elementDT);

		int arrayPtrComponentIndex = 0; /* HACK, field ordinal of void* data field in slice type */
		DataTypeComponent arrayDTC = genericSliceDT.getComponent(arrayPtrComponentIndex);
		sliceDT.replace(arrayPtrComponentIndex, elementPtrDT, -1, arrayDTC.getFieldName(),
			arrayDTC.getComment());

		return sliceDT;
	}
Returns a reference to the element's type.
@return reference to the element's type
@throws IOException if error reading data
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/rtti/types/GoSliceType.java