func (opts formatOptions) CanFormatDiffSlice(v *valueNode) bool {
	switch {
	case opts.DiffMode != diffUnknown:
		return false  
	case v.NumDiff == 0:
		return false  
	case !v.ValueX.IsValid() || !v.ValueY.IsValid():
		return false  
	case v.Type.Kind() == reflect.Slice && (v.ValueX.Len() == 0 || v.ValueY.Len() == 0):
		return false  
	case v.NumIgnored > 0:
		return false  
	case v.NumTransformed > 0:
		return false  
	case v.NumCompared > 1:
		return false  
	case v.NumCompared == 1 && v.Type.Name() != "":
		return false
	}
	switch t := v.Type; t.Kind() {
	case reflect.String:
	case reflect.Array, reflect.Slice:
		switch t.Elem().Kind() {
		case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64,
			reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64, reflect.Uintptr,
			reflect.Bool, reflect.Float32, reflect.Float64, reflect.Complex64, reflect.Complex128:
		default:
			return false
		}
		if v.NumDiff > v.NumSame {
			return true
		}
	default:
		return false
	}
	const minLength = 64
	return v.ValueX.Len() >= minLength && v.ValueY.Len() >= minLength
}
CanFormatDiffSlice reports whether we support custom formatting for nodes
that are slices of primitive kinds or strings.
package cmp
import (
	"bytes"
	"fmt"
	"reflect"
	"strconv"
	"strings"
	"unicode"
	"unicode/utf8"
	"github.com/google/go-cmp/cmp/internal/diff"
)