(flags []string)
| 531 | } |
| 532 | |
| 533 | func (h *touchHandler) parse(flags []string) error { |
| 534 | l := len(flags) |
| 535 | if l != 2 && l != 3 { |
| 536 | return fmt.Errorf("received an unexpected number of flags (%d); expect %v", l, expectedTouchInput) |
| 537 | } |
| 538 | |
| 539 | h.args.Key = flags[0] |
| 540 | |
| 541 | exp, err := strconv.ParseInt(flags[1], 10, 32) |
| 542 | if err != nil { |
| 543 | return fmt.Errorf("could not parse expiration field: %v", err) |
| 544 | return err |
| 545 | } |
| 546 | h.args.Exp = convertMemcacheExpToUnix(int32(exp)) |
| 547 | |
| 548 | if l == 3 { |
| 549 | if flags[2] != noreply { |
| 550 | return fmt.Errorf("was expecting %v; got %v", noreply, flags[2]) |
| 551 | } |
| 552 | |
| 553 | h.noReply = true |
| 554 | } |
| 555 | |
| 556 | return nil |
| 557 | } |
| 558 | |
| 559 | func (h *touchHandler) readBytes() int64 { |
| 560 | return -1 |
nothing calls this directly
no test coverage detected