mirror of
https://github.com/ScuroNeko/mtg.git
synced 2026-08-31 15:04:03 +03:00
fix: address staticcheck lint issues
- avoid deprecated DefaultIdleTimeout, use time.Minute directly - simplify embedded field selectors (QF1008)
This commit is contained in:
+2
-2
@@ -104,13 +104,13 @@ type connIdleTimeout struct {
|
||||
}
|
||||
|
||||
func (c connIdleTimeout) Read(b []byte) (int, error) {
|
||||
c.Conn.SetReadDeadline(time.Now().Add(c.timeout)) //nolint: errcheck
|
||||
c.SetReadDeadline(time.Now().Add(c.timeout)) //nolint: errcheck
|
||||
|
||||
return c.Conn.Read(b) //nolint: wrapcheck
|
||||
}
|
||||
|
||||
func (c connIdleTimeout) Write(b []byte) (int, error) {
|
||||
c.Conn.SetWriteDeadline(time.Now().Add(c.timeout)) //nolint: errcheck
|
||||
c.SetWriteDeadline(time.Now().Add(c.timeout)) //nolint: errcheck
|
||||
|
||||
return c.Conn.Write(b) //nolint: wrapcheck
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user