(r *bufio.Reader, size int)
| 183 | } |
| 184 | |
| 185 | func (t *groupAssignment) readFrom(r *bufio.Reader, size int) (remain int, err error) { |
| 186 | // I came across this case when testing for compatibility with bsm/sarama-cluster. It |
| 187 | // appears in some cases, sarama-cluster can send a nil array entry. Admittedly, I |
| 188 | // didn't look too closely at it. |
| 189 | if size == 0 { |
| 190 | t.Topics = map[string][]int32{} |
| 191 | return 0, nil |
| 192 | } |
| 193 | |
| 194 | if remain, err = readInt16(r, size, &t.Version); err != nil { |
| 195 | return |
| 196 | } |
| 197 | if remain, err = readMapStringInt32(r, remain, &t.Topics); err != nil { |
| 198 | return |
| 199 | } |
| 200 | if remain, err = readBytes(r, remain, &t.UserData); err != nil { |
| 201 | return |
| 202 | } |
| 203 | |
| 204 | return |
| 205 | } |
| 206 | |
| 207 | func (t groupAssignment) bytes() []byte { |
| 208 | buf := bytes.NewBuffer(nil) |
nothing calls this directly
no test coverage detected