MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / parsePopCount

Function parsePopCount

internal/api/redis_queue_protocol.go:399–411  ·  view source on GitHub ↗
(args []string)

Source from the content-addressed store, hash-verified

397}
398
399func parsePopCount(args []string) (count int, hasCount bool, ok bool) {
400 if len(args) != 2 && len(args) != 3 {
401 return 0, false, false
402 }
403 if len(args) == 2 {
404 return 1, false, true
405 }
406 parsed, errParse := strconv.Atoi(strings.TrimSpace(args[2]))
407 if errParse != nil {
408 return 0, true, true
409 }
410 return parsed, true, true
411}
412
413func readRESPArray(reader *bufio.Reader) ([]string, error) {
414 prefix, errRead := reader.ReadByte()

Callers 1

handleRedisConnectionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected