From c306a046a4279adfa093f419364ef5a2513de09a Mon Sep 17 00:00:00 2001 From: Joe Tsai Date: Fri, 30 Jul 2021 23:42:13 -0700 Subject: [PATCH] Fix spelling mistakes --- cmp/cmpopts/equate.go | 2 +- cmp/compare_test.go | 7 ++++--- cmp/path.go | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cmp/cmpopts/equate.go b/cmp/cmpopts/equate.go index e4ffca8..62837c9 100644 --- a/cmp/cmpopts/equate.go +++ b/cmp/cmpopts/equate.go @@ -111,7 +111,7 @@ type timeApproximator struct { func (a timeApproximator) compare(x, y time.Time) bool { // Avoid subtracting times to avoid overflow when the - // difference is larger than the largest representible duration. + // difference is larger than the largest representable duration. if x.After(y) { // Ensure x is always before y x, y = y, x diff --git a/cmp/compare_test.go b/cmp/compare_test.go index a435209..49df7a1 100644 --- a/cmp/compare_test.go +++ b/cmp/compare_test.go @@ -515,7 +515,7 @@ func comparerTests() []test { wantPanic: "non-deterministic or non-symmetric function detected", reason: "non-deterministic filter", }, { - label: label + "/AssymetricComparer", + label: label + "/AsymmetricComparer", x: []int{1, 2, 3, 4, 5, 6, 7, 8, 9, 10}, y: []int{10, 9, 8, 7, 6, 5, 4, 3, 2, 1}, opts: []cmp.Option{ @@ -1288,8 +1288,9 @@ using the AllowUnexported option.`, "\n"), }(): 0}, reason: "printing map keys should have some verbosity limit imposed", }, { - label: label + "/LargeStringInInterface", - x: struct{ X interface{} }{"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet pretium ligula, at gravida quam. Integer iaculis, velit at sagittis ultricies, lacus metus scelerisque turpis, ornare feugiat nulla nisl ac erat. Maecenas elementum ultricies libero, sed efficitur lacus molestie non. Nulla ac pretium dolor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Pellentesque mi lorem, consectetur id porttitor id, sollicitudin sit amet enim. Duis eu dolor magna. Nunc ut augue turpis."}, + label: label + "/LargeStringInInterface", + x: struct{ X interface{} }{"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet pretium ligula, at gravida quam. Integer iaculis, velit at sagittis ultricies, lacus metus scelerisque turpis, ornare feugiat nulla nisl ac erat. Maecenas elementum ultricies libero, sed efficitur lacus molestie non. Nulla ac pretium dolor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Pellentesque mi lorem, consectetur id porttitor id, sollicitudin sit amet enim. Duis eu dolor magna. Nunc ut augue turpis."}, + y: struct{ X interface{} }{"Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam sit amet pretium ligula, at gravida quam. Integer iaculis, velit at sagittis ultricies, lacus metus scelerisque turpis, ornare feugiat nulla nisl ac erat. Maecenas elementum ultricies libero, sed efficitur lacus molestie non. Nulla ac pretium dolor. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Orci varius natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Pellentesque mi lorem, consectetur id porttitor id, sollicitudin sit amet enim. Duis eu dolor magna. Nunc ut augue turpis,"}, reason: "strings within an interface should benefit from specialized diffing", }, { diff --git a/cmp/path.go b/cmp/path.go index f01eff3..c710034 100644 --- a/cmp/path.go +++ b/cmp/path.go @@ -178,7 +178,7 @@ type structField struct { unexported bool mayForce bool // Forcibly allow visibility paddr bool // Was parent addressable? - pvx, pvy reflect.Value // Parent values (always addressible) + pvx, pvy reflect.Value // Parent values (always addressable) field reflect.StructField // Field information }