From 6c0756d70c5f1403b80654595ed5a07b4b69193c Mon Sep 17 00:00:00 2001 From: Travis Bischel Date: Sat, 21 May 2022 12:05:45 -0600 Subject: [PATCH] drop go-cmp dep cmp.Diff was only used by one test and can easily be swapped with reflect.DeepEqual, which allows us to drop one dep from this package. --- go.mod | 1 - go.sum | 4 ---- pkg/kgo/group_balancer_test.go | 7 +++---- 3 files changed, 3 insertions(+), 9 deletions(-) diff --git a/go.mod b/go.mod index 41d8ff3d..636a28d3 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,6 @@ module github.com/twmb/franz-go go 1.15 require ( - github.com/google/go-cmp v0.5.7 github.com/klauspost/compress v1.15.2 github.com/pierrec/lz4/v4 v4.1.14 github.com/twmb/franz-go/pkg/kmsg v1.0.0 diff --git a/go.sum b/go.sum index 09868f2f..a4517c49 100644 --- a/go.sum +++ b/go.sum @@ -1,5 +1,3 @@ -github.com/google/go-cmp v0.5.7 h1:81/ik6ipDQS2aGcBfIN5dHDB36BwrStyeAQquSYCV4o= -github.com/google/go-cmp v0.5.7/go.mod h1:n+brtR0CgQNWTVd5ZUFpTBC8YFBDLK/h/bpaJ8/DtOE= github.com/klauspost/compress v1.15.2 h1:3WH+AG7s2+T8o3nrM/8u2rdqUEcQhmga7smjrT41nAw= github.com/klauspost/compress v1.15.2/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU= github.com/pierrec/lz4/v4 v4.1.14 h1:+fL8AQEZtz/ijeNnpduH0bROTu0O3NZAlPjQxGn8LwE= @@ -17,5 +15,3 @@ golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543 h1:E7g+9GITq07hpfrRu66IVDexMakfv52eLZ2CXBWiKr4= -golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= diff --git a/pkg/kgo/group_balancer_test.go b/pkg/kgo/group_balancer_test.go index 41fd2b34..02bccf33 100644 --- a/pkg/kgo/group_balancer_test.go +++ b/pkg/kgo/group_balancer_test.go @@ -1,10 +1,9 @@ package kgo import ( + "reflect" "testing" - "github.com/google/go-cmp/cmp" - "github.com/twmb/franz-go/pkg/kmsg" ) @@ -95,7 +94,7 @@ func Test_stickyAdjustCooperative(t *testing.T) { (&BalancePlan{inPlan}).AdjustCooperative(b) - if diff := cmp.Diff(inPlan, expPlan, cmp.AllowUnexported()); diff != "" { - t.Error(diff) + if !reflect.DeepEqual(inPlan, expPlan) { + t.Errorf("got plan != exp\ngot: %#v\nexp: %#v\n", inPlan, expPlan) } }