(args []string)
| 397 | } |
| 398 | |
| 399 | func 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 | |
| 413 | func readRESPArray(reader *bufio.Reader) ([]string, error) { |
| 414 | prefix, errRead := reader.ReadByte() |
no outgoing calls
no test coverage detected