You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: format.go
    path of file: ./repos/streamdal/apps/server/vendor/github.com/onsi/gomega/format
    
    the code of the file until where you have to start completion: /*
Gomega's format package pretty-prints objects.  It explores input objects recursively and generates formatted, indented output with type information.
*/

// untested sections: 4

package format

import (
	"context"
	"fmt"
	"reflect"
	"strconv"
	"strings"
	"time"
)

// Use MaxDepth to set the maximum recursion depth when printing deeply nested objects
var MaxDepth = uint(10)

// MaxLength of the string representation of an object.
// If MaxLength is set to 0, the Object will not be truncated.
var MaxLength = 4000

/*
By default, all objects (even those that implement fmt.Stringer and fmt.GoStringer) are recursively inspected to generate output.

Set UseStringerRepresentation = true to use GoString (for fmt.GoStringers) or String (f
    
func MessageWithDiff(actual, message, expected string) string {
	if TruncatedDiff && len(actual) >= int(TruncateThreshold) && len(expected) >= int(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)

		paddingCount := spaceFromMessageToActual + spacesBeforeFormattedMismatch
		if paddingCount < 0 {
			return Message(formattedActual, message, formattedExpected)
		}

		padding := strings.Repeat(" ", paddingCount) + "|"
		return Message(formattedActual, message+padding, formattedExpected)
	}

	actual = escapedWithGoSyntax(actual)
	expected = escapedWithGoSyntax(expected)

	return Message(actual, message, expected)
}