@Override
	public boolean added(Program program, AddressSetView set, TaskMonitor monitor, MessageLog log)
			throws CancelledException {

		this.program = program;
		goBinary = GoRttiMapper.getSharedGoBinary(program, monitor);
		if (goBinary == null) {
			Msg.error(this, "Golang string analyzer error: unable to get GoRttiMapper");
			return false;
		}

		sliceStructLen = goBinary.getStructureMappingInfo(GoSlice.class).getStructureLength();
		stringStructLen = goBinary.getStructureMappingInfo(GoString.class).getStructureLength();

		markupSession = goBinary.createMarkupSession(monitor);
		storageAllocator = goBinary.newStorageAllocator();

		int stringCount = 0;

		try {
			stringCount = markupStaticStructRefsInFunctions(set, monitor);

			if (analyzerOptions.markupDataSegmentStructs) {
				stringCount += markupDataSegmentStructs(monitor);
			}
		}
		catch (IOException e) {
			Msg.error(this, "Golang analysis failure", e);
		}

		Msg.info(this, "Golang strings found: %d".formatted(stringCount));

		return true;
	}
Analyzer that finds Golang strings (and optionally slices) and marks up the found instances.
<p>
The char[] data for Golang strings does not contain null terminators, so the normal logic already
built into Ghidra to find terminated strings doesn't work.
<p>
This implementation looks for data that matches what a Golang string 
struct { char* data, long len } would look like, and follows the pointer to the char[] data 
and creates a fixed-length string at that location using the length info from the struct.
<p>
The string struct is found in a couple of different ways:
<ul>
	<li>References from an instruction (see markupStaticStructRefsInFunction)</li>
 <li>Iterating through data segments and making educated guesses (see markupDataSegmentStructs)</li>
</ul>
Some char[] data is only referenced from Golang string structs that exist temporarily
in registers after being set by an instruction that statically references the char[] data,
and an instruction that statically contains the length. (see tryCreateInlineString) 
<p>
Because slice structures can look like string structs, possible string struct locations are also
examined for slice-ness.  When marking a struct as a slice instead of as a string, the data
pointed to by the slice is not marked up because there is no information about the size of the
elements that the slice points to.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/analysis/GolangStringAnalyzer.java