@Override
	public DataType recoverDataType(GoTypeManager goTypes) throws IOException {
		StructureDataType struct = new StructureDataType(goTypes.getCP(this),
			goTypes.getTypeName(this), (int) typ.getSize(), goTypes.getDTM());

		// pre-push an empty struct into the cache to prevent endless recursive loops
		goTypes.cacheRecoveredDataType(this, struct);

		List<GoStructField> skippedFields = new ArrayList<>();
		List<GoStructField> fieldList = getFields();
		for (int i = 0; i < fieldList.size(); i++) {
			GoStructField field = fieldList.get(i);
//			GoStructField nextField = i < fieldList.size() - 1 ? fieldList.get(i + 1) : null;
//			long availSpace = nextField != null
//					? nextField.getOffset() - field.getOffset()
//					: typ.getSize() - field.getOffset();

			GoType fieldType = field.getType();
			long fieldSize = fieldType.getBaseType().getSize();

			if (fieldSize == 0) {
				skippedFields.add(field);
				continue;
			}

			try {
				DataType fieldDT = goTypes.getGhidraDataType(fieldType);
				struct.replaceAtOffset((int) field.getOffset(), fieldDT, (int) fieldSize,
					field.getName(), null);
			}
			catch (IllegalArgumentException e) {
				Msg.warn(this,
					"Failed to add field to go recovered struct: %s".formatted(getDebugId()), e);
			}
		}
		for (GoStructField skippedField : skippedFields) {
			DataTypeComponent dtc =
				struct.getDefinedComponentAtOrAfterOffset((int) skippedField.getOffset());
			GoType skippedFieldType = skippedField.getType();
			if (dtc != null) {
				String comment = dtc.getComment();
				comment = comment == null ? "" : (comment + "\n");
				comment += "Omitted zero-len field: %s=%s".formatted(skippedField.getName(),
					skippedFieldType.getName());
				dtc.setComment(comment);
			}
		}

		DWARFUtil.packCompositeIfPossible(struct, goTypes.getDTM());
		return struct;
	}
Returns the fields defined by this struct type.

@return list of fields defined by this struct type
@throws IOException if error reading
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/rtti/types/GoStructType.java