mirror of
https://github.com/tailscale/tailscale.git
synced 2025-10-10 09:14:57 +00:00
Fix staticcheck warning, add Makefile with staticcheck targets, lock in staticcheck version in go.mod
This commit is contained in:
@@ -338,7 +338,7 @@ func (c *Client) recvTimeout(timeout time.Duration) (m ReceivedMessage, err erro
|
||||
if c.peeked != 0 {
|
||||
if n, err := c.br.Discard(c.peeked); err != nil || n != c.peeked {
|
||||
// Documented to never fail, but might as well check.
|
||||
return nil, fmt.Errorf("Discard(%d bytes): got %v, %v", c.peeked, n, err)
|
||||
return nil, fmt.Errorf("bufio.Reader.Discard(%d bytes): got %v, %v", c.peeked, n, err)
|
||||
}
|
||||
c.peeked = 0
|
||||
}
|
||||
|
Reference in New Issue
Block a user