mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-09-03 17:01:55 +03:00
Update golangci-lint
This commit is contained in:
@@ -7,10 +7,9 @@ import (
|
||||
"net"
|
||||
"time"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
"github.com/9seconds/mtg/conntypes"
|
||||
"github.com/9seconds/mtg/tlstypes"
|
||||
"go.uber.org/zap"
|
||||
)
|
||||
|
||||
type wrapperFakeTLS struct {
|
||||
@@ -33,6 +32,7 @@ func (w *wrapperFakeTLS) WriteTimeout(p []byte, timeout time.Duration) (int, err
|
||||
if elapsed > timeout {
|
||||
return w.parent.WriteTimeout(b, timeout-elapsed)
|
||||
}
|
||||
|
||||
return 0, errors.New("timeout")
|
||||
})
|
||||
}
|
||||
@@ -95,6 +95,8 @@ func NewFakeTLS(socket conntypes.StreamReadWriteCloser) conntypes.StreamReadWrit
|
||||
rec.Data.WriteBytes(buf)
|
||||
|
||||
return buf.Bytes(), nil
|
||||
case tlstypes.RecordTypeHandshake:
|
||||
return nil, errors.New("unsupported record type handshake")
|
||||
default:
|
||||
return nil, fmt.Errorf("unsupported record type %v", rec.Type)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user