mirror of
https://github.com/fatedier/frp.git
synced 2026-04-22 00:49:10 +08:00
refactor: fix modernize lint issues (#5215)
This commit is contained in:
@@ -86,11 +86,7 @@ func (c *FakeUDPConn) Read(b []byte) (n int, err error) {
|
||||
c.lastActive = time.Now()
|
||||
c.mu.Unlock()
|
||||
|
||||
if len(b) < len(content) {
|
||||
n = len(b)
|
||||
} else {
|
||||
n = len(content)
|
||||
}
|
||||
n = min(len(b), len(content))
|
||||
copy(b, content)
|
||||
return n, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user