Merge pull request #3447 from xiang90/txn

etcdctlv3: fix txn command
This commit is contained in:
Xiang Li 2015-09-05 18:21:11 -07:00
commit b9646b5734

View File

@ -190,13 +190,13 @@ func parseCompare(line string) (*pb.Compare, error) {
}
case "c", "create":
c.Target = pb.Compare_CREATE
c.CreateIndex, err = strconv.ParseInt(parts[3], 10, 64)
c.CreateRevision, err = strconv.ParseInt(parts[3], 10, 64)
if err != nil {
return nil, fmt.Errorf("invalid txn compare request: %s", line)
}
case "m", "mod":
c.Target = pb.Compare_MOD
c.ModIndex, err = strconv.ParseInt(parts[3], 10, 64)
c.ModRevision, err = strconv.ParseInt(parts[3], 10, 64)
if err != nil {
return nil, fmt.Errorf("invalid txn compare request: %s", line)
}