瀏覽代碼

etcdctlv3: fix txn command

Xiang Li 10 年之前
父節點
當前提交
1532f7585b
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      etcdctlv3/command/txn_command.go

+ 2 - 2
etcdctlv3/command/txn_command.go

@@ -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)
 		}