private void moveAllDataTypesTo(DataTypeManager dtm, CategoryPath srcCP, CategoryPath destCP)
			throws DuplicateNameException, DataTypeDependencyException, InvalidNameException {
		Category srcCat = dtm.getCategory(srcCP);
		if (srcCat != null) {
			for (DataType dt : srcCat.getDataTypes()) {
				if (dt instanceof Array || dt instanceof Pointer) {
					continue;
				}
				String destName = dt.getName();
				if (dt instanceof TypeDef td && td.getName().startsWith(".param")) {
					// special case of typedefs called ".paramNNN" (created by go for generic type params)
					// The type name needs to be tweaked to prevent clashes with others
					destName = td.getCategoryPath().getName() + dt.getName();
				}
				DataType existingDT = dtm.getDataType(new DataTypePath(destCP, destName));
				if (existingDT != null) {
					if (DWARFDataTypeConflictHandler.INSTANCE.resolveConflict(dt,
						existingDT) != ConflictResult.USE_EXISTING) {
						throw new DuplicateNameException("Error moving golang type: [%s] to [%s]"
								.formatted(dt.getDataTypePath(), existingDT.getDataTypePath()));
					}
					dtm.replaceDataType(dt, existingDT, false);
					continue;
				}
				dt.setNameAndCategory(destCP, destName);
			}
			for (Category subcat : srcCat.getCategories()) {
				moveAllDataTypesTo(dtm, subcat.getCategoryPath(), destCP); // flatten everything
			}
		}
	}
Export the currently registered struct mapping types to a gdt file, producing a bootstrap
GDT archive.
<p>
The struct data types will either be from the current program's DWARF data, or
from an earlier golang.gdt (if this binary doesn't have DWARF)

@param gdtFile destination {@link File} to write the bootstrap types to
@param runtimeFuncSnapshot boolean flag, if true include function definitions
@param monitor {@link TaskMonitor}
@throws IOException if error
@throws CancelledException if cancelled
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/rtti/GoRttiMapper.java