format/format.go
func MessageWithDiff(actual, message, expected string) string {
	if TruncatedDiff && len(actual) >= truncateThreshold && len(expected) >= truncateThreshold {
		diffPoint := findFirstMismatch(actual, expected)
		formattedActual := truncateAndFormat(actual, diffPoint)
		formattedExpected := truncateAndFormat(expected, diffPoint)

		spacesBeforeFormattedMismatch := findFirstMismatch(formattedActual, formattedExpected)

		tabLength := 4
		spaceFromMessageToActual := tabLength + len("<string>: ") - len(message)
		padding := strings.Repeat(" ", spaceFromMessageToActual+spacesBeforeFormattedMismatch) + "|"
		return Message(formattedActual, message+padding, formattedExpected)
	}
	return Message(actual, message, expected)
}
func MessageWithDiff(actual, message, expected string) string {
	if TruncatedDiff && len(actual) >= truncateThreshold && len(expected) >= truncateThreshold {
		diffPoint := findFirstMismatch(actual, expected)
		formattedActual := truncateAndFormat(actual, diffPoint)
		formattedExpected := truncateAndFormat(expected, diffPoint)

		spacesBeforeFormattedMismatch := findFirstMismatch(formattedActual, formattedExpected)

		tabLength := 4
		spaceFromMessageToActual := tabLength + len("<string>: ") - len(message)
		padding := strings.Repeat(" ", spaceFromMessageToActual+spacesBeforeFormattedMismatch) + "|"
		return Message(formattedActual, message+padding, formattedExpected)
	}
	return Message(actual, message, expected)
}
/*

Generates a nicely formatted matcher success / failure message

Much like Message(...), but it attempts to pretty print diffs in strings

Expected
    <string>: "...aaaaabaaaaa..."
to equal               |
    <string>: "...aaaaazaaaaa..."

*/