Browse Source

Merge pull request #3447 from xiang90/txn

etcdctlv3: fix txn command
Xiang Li 10 năm trước cách đây
mục cha
commit
b9646b5734
1 tập tin đã thay đổi với 2 bổ sung2 xóa
  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)
 		}