Chore: use any rather than interface{} (#74066)

This commit is contained in:
Ryan McKinley
2023-08-30 18:46:47 +03:00
committed by GitHub
parent 3e272d2bda
commit 025b2f3011
525 changed files with 2528 additions and 2528 deletions
+1 -1
View File
@@ -105,7 +105,7 @@ func (d *Diff) String() string {
return fmt.Sprintf("%v:\n\t-: %+v\n\t+: %+v\n", d.Path, describeReflectValue(d.Left), describeReflectValue(d.Right))
}
func describeReflectValue(v reflect.Value) interface{} {
func describeReflectValue(v reflect.Value) any {
// invalid reflect.Value is produced when two collections (slices\maps) are compared and one misses value.
// This way go-cmp indicates that an element was added\removed from a list.
if !v.IsValid() {
+1 -1
View File
@@ -12,7 +12,7 @@ import (
)
type subStruct struct {
Data interface{}
Data any
}
type testStruct struct {