From b44e43278a744639888e04f266c9941f54aca48c Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Mon, 30 Apr 2018 14:25:54 -0700 Subject: [PATCH] etcdctl/ctlv3: fix "unconvert" warnings Signed-off-by: Gyuho Lee --- etcdctl/ctlv3/command/check.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/etcdctl/ctlv3/command/check.go b/etcdctl/ctlv3/command/check.go index e347af295..f9b9cd65c 100644 --- a/etcdctl/ctlv3/command/check.go +++ b/etcdctl/ctlv3/command/check.go @@ -192,7 +192,7 @@ func newCheckPerfCommand(cmd *cobra.Command, args []string) { cctx, ccancel := context.WithTimeout(context.Background(), time.Duration(cfg.duration)*time.Second) defer ccancel() for limit.Wait(cctx) == nil { - binary.PutVarint(k, int64(rand.Int63n(math.MaxInt64))) + binary.PutVarint(k, rand.Int63n(math.MaxInt64)) requests <- v3.OpPut(checkPerfPrefix+string(k), v) } close(requests) @@ -349,7 +349,7 @@ func newCheckDatascaleCommand(cmd *cobra.Command, args []string) { go func() { for i := 0; i < cfg.limit; i++ { - binary.PutVarint(k, int64(rand.Int63n(math.MaxInt64))) + binary.PutVarint(k, rand.Int63n(math.MaxInt64)) requests <- v3.OpPut(checkDatascalePrefix+string(k), v) } close(requests) @@ -400,6 +400,6 @@ func newCheckDatascaleCommand(cmd *cobra.Command, args []string) { } os.Exit(ExitError) } else { - fmt.Println(fmt.Sprintf("PASS: Approximate system memory used : %v MB.", strconv.FormatFloat(float64(mbUsed), 'f', 2, 64))) + fmt.Println(fmt.Sprintf("PASS: Approximate system memory used : %v MB.", strconv.FormatFloat(mbUsed, 'f', 2, 64))) } }