fixup! fixup! fixup! Move towards the self-provided Redis connection pool and RESP protocol implementation. Official redis client library won't work with yaegi.

This commit is contained in:
2025-10-19 13:30:08 +01:00
parent 0fbd6a3ffc
commit fdde481925
4 changed files with 14 additions and 9 deletions
+6 -1
View File
@@ -247,7 +247,12 @@ func (c *RedisConn) Do(command string, args ...string) (interface{}, error) {
defer c.mu.Unlock()
// Build command arguments
cmdArgs := make([]string, 0, len(args)+1)
// Check for overflow: ensure len(args)+1 doesn't overflow int
argsLen := len(args)
if argsLen < 0 || argsLen > (1<<31)-2 {
return nil, errors.New("too many arguments")
}
cmdArgs := make([]string, 0, argsLen+1)
cmdArgs = append(cmdArgs, command)
cmdArgs = append(cmdArgs, args...)