mirror of
https://github.com/nadoo/glider.git
synced 2025-04-21 19:52:07 +08:00
chore: fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...))
This commit is contained in:
parent
4f12a4f308
commit
38cacb9e50
@ -133,7 +133,7 @@ func (c *SSTCPConn) doRead(b []byte) (n int, err error) {
|
|||||||
|
|
||||||
if !c.DecryptInited() {
|
if !c.DecryptInited() {
|
||||||
if len(decodedData) < c.InfoIVLen() {
|
if len(decodedData) < c.InfoIVLen() {
|
||||||
return 0, errors.New(fmt.Sprintf("invalid ivLen:%v, actual length:%v", c.InfoIVLen(), len(decodedData)))
|
return 0, fmt.Errorf("invalid ivLen:%v, actual length:%v", c.InfoIVLen(), len(decodedData))
|
||||||
}
|
}
|
||||||
|
|
||||||
iv := decodedData[0:c.InfoIVLen()]
|
iv := decodedData[0:c.InfoIVLen()]
|
||||||
|
Loading…
Reference in New Issue
Block a user