mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-02 00:11:56 +03:00
fix lint issues
This commit is contained in:
@@ -31,11 +31,9 @@ func (c *Conn) Read(p []byte) (int, error) {
|
|||||||
switch rec.Type { // nolint: exhaustive
|
switch rec.Type { // nolint: exhaustive
|
||||||
case record.TypeChangeCipherSpec:
|
case record.TypeChangeCipherSpec:
|
||||||
case record.TypeApplicationData:
|
case record.TypeApplicationData:
|
||||||
rec.Payload.WriteTo(&c.readBuffer)
|
rec.Payload.WriteTo(&c.readBuffer) // nolint: errcheck
|
||||||
|
|
||||||
n, err := c.readBuffer.Read(p)
|
return c.readBuffer.Read(p)
|
||||||
|
|
||||||
return n, err
|
|
||||||
default:
|
default:
|
||||||
return 0, fmt.Errorf("unsupported record type %v", rec.Type)
|
return 0, fmt.Errorf("unsupported record type %v", rec.Type)
|
||||||
}
|
}
|
||||||
@@ -60,7 +58,7 @@ func (c *Conn) Write(p []byte) (int, error) {
|
|||||||
rec.Payload.Write(p[:chunkSize])
|
rec.Payload.Write(p[:chunkSize])
|
||||||
|
|
||||||
if err := rec.Dump(c.Conn); err != nil {
|
if err := rec.Dump(c.Conn); err != nil {
|
||||||
return 0, err
|
return written, err // nolint: wrapcheck
|
||||||
}
|
}
|
||||||
|
|
||||||
written += chunkSize
|
written += chunkSize
|
||||||
|
|||||||
Reference in New Issue
Block a user