(data []byte)
| 69 | } |
| 70 | |
| 71 | func (c *Conn) handleErrorPacket(data []byte) error { |
| 72 | e := new(MyError) |
| 73 | |
| 74 | pos := 1 |
| 75 | |
| 76 | e.Code = binary.LittleEndian.Uint16(data[pos:]) |
| 77 | pos += 2 |
| 78 | |
| 79 | if c.capability&CLIENT_PROTOCOL_41 > 0 { |
| 80 | // skip '#' |
| 81 | pos++ |
| 82 | e.State = hack.String(data[pos : pos+5]) |
| 83 | pos += 5 |
| 84 | } |
| 85 | |
| 86 | e.Message = hack.String(data[pos:]) |
| 87 | |
| 88 | return e |
| 89 | } |
| 90 | |
| 91 | func (c *Conn) handleAuthResult() error { |
| 92 | data, switchToPlugin, err := c.readAuthResult() |
no test coverage detected