@@ -73,7 +73,7 @@ If the CustomFormatter does not want to handle the object it should return ("",
73
73
74
74
Strings returned by CustomFormatters are not truncated
75
75
*/
76
- type CustomFormatter func (value interface {} ) (string , bool )
76
+ type CustomFormatter func (value any ) (string , bool )
77
77
type CustomFormatterKey uint
78
78
79
79
var customFormatterKey CustomFormatterKey = 1
@@ -125,7 +125,7 @@ If expected is omitted, then the message looks like:
125
125
<pretty printed actual>
126
126
<message>
127
127
*/
128
- func Message (actual interface {} , message string , expected ... interface {} ) string {
128
+ func Message (actual any , message string , expected ... any ) string {
129
129
if len (expected ) == 0 {
130
130
return fmt .Sprintf ("Expected\n %s\n %s" , Object (actual , 1 ), message )
131
131
}
@@ -255,7 +255,7 @@ recursing into the object.
255
255
256
256
Set PrintContextObjects to true to print the content of objects implementing context.Context
257
257
*/
258
- func Object (object interface {} , indentation uint ) string {
258
+ func Object (object any , indentation uint ) string {
259
259
indent := strings .Repeat (Indent , int (indentation ))
260
260
value := reflect .ValueOf (object )
261
261
commonRepresentation := ""
@@ -392,7 +392,7 @@ func formatValue(value reflect.Value, indentation uint) string {
392
392
}
393
393
}
394
394
395
- func formatString (object interface {} , indentation uint ) string {
395
+ func formatString (object any , indentation uint ) string {
396
396
if indentation == 1 {
397
397
s := fmt .Sprintf ("%s" , object )
398
398
components := strings .Split (s , "\n " )
0 commit comments