1
0
mirror of https://github.com/redis/go-redis.git synced 2025-10-17 11:11:17 +03:00

fix: add missing error variable for non-unix build constraints (#3538)

* fix: add missing error variable for non-unix build constraints

* chore: name "_" for unused parameters

---------

Co-authored-by: Elena Kolevska <elena-kolevska@users.noreply.github.com>
This commit is contained in:
Feng.YJ
2025-09-29 14:35:04 +08:00
committed by GitHub
parent a44df88257
commit 3ad9f9cb23

View File

@@ -2,13 +2,19 @@
package pool
import "net"
import (
"errors"
"net"
)
func connCheck(conn net.Conn) error {
// errUnexpectedRead is placeholder error variable for non-unix build constraints
var errUnexpectedRead = errors.New("unexpected read from socket")
func connCheck(_ net.Conn) error {
return nil
}
// since we can't check for data on the socket, we just assume there is some
func maybeHasData(conn net.Conn) bool {
func maybeHasData(_ net.Conn) bool {
return true
}