private FuncDefResult createFuncDefFromApiSnapshot(GoSymbolName symbolName, GoType recvType,
			GoFuncDef snapshotFuncdef) throws IOException {
		EnumSet<FuncDefFlags> flags = EnumSet.of(FROM_SNAPSHOT);
		List<ParameterDefinition> params = new ArrayList<>();
		List<ParameterDefinition> returnParams = new ArrayList<>();
		for (int i =0; i < snapshotFuncdef.Params.size(); i++) {
			GoNameTypePair p = snapshotFuncdef.Params.get(i);
			GoType pType = goTypes.findGoType(p.DataType);
			if (pType == null) {
				pType = goTypes.getSubstitutionType(p.DataType);
				if ( pType == null ) {
					break;
				}
				if ( i == 0 && symbolName.hasReceiver() ) {
					flags.add(RECV_ARTIFICIAL);
				} else {
					flags.add(PARAM_SUBSTITUTION);
				}
			}
			String paramName = p.Name == null && i == 0 ? GOLANG_RECEIVER_PARAM_NAME : p.Name;
			params.add(
				new ParameterDefinitionImpl(paramName, goTypes.getGhidraDataType(pType), null));
		}
		for (GoNameTypePair p : snapshotFuncdef.Results) {
			GoType pType = goTypes.findGoType(p.DataType);
			if (pType == null) {
				pType = goTypes.getSubstitutionType(p.DataType);
				if (pType != null) {
					flags.add(RESULT_SUBSTITUTION);
				}
			}
			if ( pType == null ) {
				break;
			}
			returnParams.add(
				new ParameterDefinitionImpl(p.Name, goTypes.getGhidraDataType(pType), null));
		}
		
		if ( params.size() < snapshotFuncdef.Params.size() ) {
			flags.add(params.isEmpty() ? PARAMS_MISSING : FuncDefFlags.PARAMS_PARTIAL);
		}
		if ( returnParams.size() < snapshotFuncdef.Results.size() ) {
			if (returnParams.isEmpty()) {
				returnParams = null;
			}
			flags.add(returnParams == null ? RETURN_INFO_MISSING : RETURN_INFO_PARTIAL);
		}
		if ( symbolName.hasGenerics() ) {
			// insert artificial generic dict param, iff recv param was successfully added
			int generics_index = symbolName.hasReceiver() && params.size() > 0 ? 1 : 0;
			if (params.size() >= generics_index) {
				params.add(generics_index,
					new ParameterDefinitionImpl(GOLANG_GENERICS_PARAM_NAME,
						goTypes.getGenericDictDT(), null));
			}
		}
		
		FunctionDefinitionDataType funcDef = createFuncDef(params, returnParams, symbolName,
			snapshotFuncdef.getFuncFlags().contains(FuncFlags.NoReturn));
		return new FuncDefResult(funcDef, recvType, flags,
			snapshotFuncdef.getDefinitionString(symbolName), symbolName);

	}
Returns function definition information for a func.

@param funcData {@link GoFuncData} representing a go func
@return {@link FuncDefResult} record, or null if no information could be found or
generated
@throws IOException if error reading type info
Ghidra/Features/Base/src/main/java/ghidra/app/util/bin/format/golang/rtti/GoRttiMapper.java