Browse Source

ctlv3: keep lease as integer in fields printer

Output was giving %!d(string=) instead of the expected lease ID
value.
Anthony Romano 8 years ago
parent
commit
fcd4871e2a
1 changed files with 1 additions and 1 deletions
  1. 1 1
      etcdctl/ctlv3/command/printer_fields.go

+ 1 - 1
etcdctl/ctlv3/command/printer_fields.go

@@ -30,7 +30,7 @@ func (p *fieldsPrinter) kv(pfx string, kv *spb.KeyValue) {
 	fmt.Printf("\"%sModRevision\" : %d\n", pfx, kv.ModRevision)
 	fmt.Printf("\"%sVersion\" : %d\n", pfx, kv.Version)
 	fmt.Printf("\"%sValue\" : %q\n", pfx, string(kv.Value))
-	fmt.Printf("\"%sLease\" : %d\n", pfx, string(kv.Lease))
+	fmt.Printf("\"%sLease\" : %d\n", pfx, kv.Lease)
 }
 
 func (p *fieldsPrinter) hdr(h *pb.ResponseHeader) {