From 94dce3e27b076b2c2be44c8dd1ee8c10219293af Mon Sep 17 00:00:00 2001 From: Kranti Deep Date: Sun, 12 Jul 2020 23:05:21 +0530 Subject: [PATCH] change return type of MockJoinGroupResponse.For, MockHeartbeatResponse.For & MockLeaveGroupResponse.For to encoderWithHeader --- mockresponses.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/mockresponses.go b/mockresponses.go index 69e3a9f75..8a3ed0710 100644 --- a/mockresponses.go +++ b/mockresponses.go @@ -1098,7 +1098,7 @@ func NewMockJoinGroupResponse(t TestReporter) *MockJoinGroupResponse { } } -func (m *MockJoinGroupResponse) For(reqBody versionedDecoder) encoder { +func (m *MockJoinGroupResponse) For(reqBody versionedDecoder) encoderWithHeader { req := reqBody.(*JoinGroupRequest) resp := &JoinGroupResponse{ Version: req.Version, @@ -1162,7 +1162,7 @@ func NewMockLeaveGroupResponse(t TestReporter) *MockLeaveGroupResponse { return &MockLeaveGroupResponse{t: t} } -func (m *MockLeaveGroupResponse) For(reqBody versionedDecoder) encoder { +func (m *MockLeaveGroupResponse) For(reqBody versionedDecoder) encoderWithHeader { resp := &LeaveGroupResponse{ Err: m.Err, } @@ -1185,7 +1185,7 @@ func NewMockSyncGroupResponse(t TestReporter) *MockSyncGroupResponse { return &MockSyncGroupResponse{t: t} } -func (m *MockSyncGroupResponse) For(reqBody versionedDecoder) encoder { +func (m *MockSyncGroupResponse) For(reqBody versionedDecoder) encoderWithHeader { resp := &SyncGroupResponse{ Err: m.Err, MemberAssignment: m.MemberAssignment, @@ -1217,10 +1217,8 @@ func NewMockHeartbeatResponse(t TestReporter) *MockHeartbeatResponse { return &MockHeartbeatResponse{t: t} } -func (m *MockHeartbeatResponse) For(reqBody versionedDecoder) encoder { - resp := &HeartbeatResponse{ - Err: m.Err, - } +func (m *MockHeartbeatResponse) For(reqBody versionedDecoder) encoderWithHeader { + resp := &HeartbeatResponse{} return resp }