var panicBytes … var plusBytes … var iBytes … var trueBytes … var falseBytes … var interfaceBytes … var commaNewlineBytes … var newlineBytes … var openBraceBytes … var openBraceNewlineBytes … var closeBraceBytes … var asteriskBytes … var colonBytes … var colonSpaceBytes … var openParenBytes … var closeParenBytes … var spaceBytes … var pointerChainBytes … var nilAngleBytes … var maxNewlineBytes … var maxShortBytes … var circularBytes … var circularShortBytes … var invalidAngleBytes … var openBracketBytes … var closeBracketBytes … var percentBytes … var precisionBytes … var openAngleBytes … var closeAngleBytes … var openMapBytes … var closeMapBytes … var lenEqualsBytes … var capEqualsBytes … var hexDigits … // catchPanic handles any panics that might occur during the handleMethods // calls. func catchPanic(w io.Writer, v reflect.Value) { … } // handleMethods attempts to call the Error and String methods on the underlying // type the passed reflect.Value represents and outputes the result to Writer w. // // It handles panics in any called methods by catching and displaying the error // as the formatted value. func handleMethods(cs *ConfigState, w io.Writer, v reflect.Value) (handled bool) { … } // printBool outputs a boolean value as true or false to Writer w. func printBool(w io.Writer, val bool) { … } // printInt outputs a signed integer value to Writer w. func printInt(w io.Writer, val int64, base int) { … } // printUint outputs an unsigned integer value to Writer w. func printUint(w io.Writer, val uint64, base int) { … } // printFloat outputs a floating point value using the specified precision, // which is expected to be 32 or 64bit, to Writer w. func printFloat(w io.Writer, val float64, precision int) { … } // printComplex outputs a complex value using the specified float precision // for the real and imaginary parts to Writer w. func printComplex(w io.Writer, c complex128, floatPrecision int) { … } // printHexPtr outputs a uintptr formatted as hexadecimal with a leading '0x' // prefix to Writer w. func printHexPtr(w io.Writer, p uintptr) { … } type valuesSorter … // newValuesSorter initializes a valuesSorter instance, which holds a set of // surrogate keys on which the data should be sorted. It uses flags in // ConfigState to decide if and how to populate those surrogate keys. func newValuesSorter(values []reflect.Value, cs *ConfigState) sort.Interface { … } // canSortSimply tests whether a reflect.Kind is a primitive that can be sorted // directly, or whether it should be considered for sorting by surrogate keys // (if the ConfigState allows it). func canSortSimply(kind reflect.Kind) bool { … } // Len returns the number of values in the slice. It is part of the // sort.Interface implementation. func (s *valuesSorter) Len() int { … } // Swap swaps the values at the passed indices. It is part of the // sort.Interface implementation. func (s *valuesSorter) Swap(i, j int) { … } // valueSortLess returns whether the first value should sort before the second // value. It is used by valueSorter.Less as part of the sort.Interface // implementation. func valueSortLess(a, b reflect.Value) bool { … } // Less returns whether the value at index i should sort before the // value at index j. It is part of the sort.Interface implementation. func (s *valuesSorter) Less(i, j int) bool { … } // sortValues is a sort function that handles both native types and any type that // can be converted to error or Stringer. Other inputs are sorted according to // their Value.String() value to ensure display stability. func sortValues(values []reflect.Value, cs *ConfigState) { … }