etcdctl/ctlv3: fix "unconvert" warnings
@@ -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)))
}
}
