From 1ceccb326ab3e55a7db728f0061e415a1df04d7e Mon Sep 17 00:00:00 2001 From: Pieter Callewaert Date: Tue, 4 Oct 2016 11:47:00 +0200 Subject: [PATCH 1/2] add missing metadata and assignment methods in describegroups --- describe_groups_response.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/describe_groups_response.go b/describe_groups_response.go index e78b8ce02..7a5a76024 100644 --- a/describe_groups_response.go +++ b/describe_groups_response.go @@ -172,3 +172,15 @@ func (gmd *GroupMemberDescription) decode(pd packetDecoder) (err error) { return nil } + +func (r *GroupMemberDescription) GetMemberAssignment() (*ConsumerGroupMemberAssignment, error) { + assignment := new(ConsumerGroupMemberAssignment) + err := decode(r.MemberAssignment, assignment) + return assignment, err +} + +func (r *GroupMemberDescription) GetMemberMetadata() (*ConsumerGroupMemberMetadata, error) { + assignment := new(ConsumerGroupMemberMetadata) + err := decode(r.MemberMetadata, assignment) + return assignment, err +} From a7508ea74a2d961d1e39c851152bd300a516fb79 Mon Sep 17 00:00:00 2001 From: Pieter Callewaert Date: Tue, 4 Oct 2016 16:24:08 +0200 Subject: [PATCH 2/2] fix nameconvention errors --- describe_groups_response.go | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/describe_groups_response.go b/describe_groups_response.go index 7a5a76024..d2c2071e1 100644 --- a/describe_groups_response.go +++ b/describe_groups_response.go @@ -173,14 +173,14 @@ func (gmd *GroupMemberDescription) decode(pd packetDecoder) (err error) { return nil } -func (r *GroupMemberDescription) GetMemberAssignment() (*ConsumerGroupMemberAssignment, error) { +func (gmd *GroupMemberDescription) GetMemberAssignment() (*ConsumerGroupMemberAssignment, error) { assignment := new(ConsumerGroupMemberAssignment) - err := decode(r.MemberAssignment, assignment) + err := decode(gmd.MemberAssignment, assignment) return assignment, err } -func (r *GroupMemberDescription) GetMemberMetadata() (*ConsumerGroupMemberMetadata, error) { - assignment := new(ConsumerGroupMemberMetadata) - err := decode(r.MemberMetadata, assignment) - return assignment, err +func (gmd *GroupMemberDescription) GetMemberMetadata() (*ConsumerGroupMemberMetadata, error) { + metadata := new(ConsumerGroupMemberMetadata) + err := decode(gmd.MemberMetadata, metadata) + return metadata, err }