Skip to content

Commit

Permalink
don't export listGroupsResponseV1 (segmentio#394)
Browse files Browse the repository at this point in the history
  • Loading branch information
Achille authored Jan 7, 2020
1 parent 48f0c13 commit a44a65c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions listgroups.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,22 +14,22 @@ func (t listGroupsRequestV1) size() int32 {
func (t listGroupsRequestV1) writeTo(wb *writeBuffer) {
}

type ListGroupsResponseGroupV1 struct {
type listGroupsResponseGroupV1 struct {
// GroupID holds the unique group identifier
GroupID string
ProtocolType string
}

func (t ListGroupsResponseGroupV1) size() int32 {
func (t listGroupsResponseGroupV1) size() int32 {
return sizeofString(t.GroupID) + sizeofString(t.ProtocolType)
}

func (t ListGroupsResponseGroupV1) writeTo(wb *writeBuffer) {
func (t listGroupsResponseGroupV1) writeTo(wb *writeBuffer) {
wb.writeString(t.GroupID)
wb.writeString(t.ProtocolType)
}

func (t *ListGroupsResponseGroupV1) readFrom(r *bufio.Reader, size int) (remain int, err error) {
func (t *listGroupsResponseGroupV1) readFrom(r *bufio.Reader, size int) (remain int, err error) {
if remain, err = readString(r, size, &t.GroupID); err != nil {
return
}
Expand All @@ -47,7 +47,7 @@ type listGroupsResponseV1 struct {

// ErrorCode holds response error code
ErrorCode int16
Groups []ListGroupsResponseGroupV1
Groups []listGroupsResponseGroupV1
}

func (t listGroupsResponseV1) size() int32 {
Expand All @@ -71,7 +71,7 @@ func (t *listGroupsResponseV1) readFrom(r *bufio.Reader, size int) (remain int,
}

fn := func(withReader *bufio.Reader, withSize int) (fnRemain int, fnErr error) {
var item ListGroupsResponseGroupV1
var item listGroupsResponseGroupV1
if fnRemain, fnErr = (&item).readFrom(withReader, withSize); err != nil {
return
}
Expand Down
2 changes: 1 addition & 1 deletion listgroups_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
func TestListGroupsResponseV1(t *testing.T) {
item := listGroupsResponseV1{
ErrorCode: 2,
Groups: []ListGroupsResponseGroupV1{
Groups: []listGroupsResponseGroupV1{
{
GroupID: "a",
ProtocolType: "b",
Expand Down

0 comments on commit a44a65c

Please sign in to comment.