mirror of
https://github.com/minio/mc.git
synced 2025-07-28 20:01:58 +03:00
cleanup commands to use Go 'err' as 'e' (#4232)
many commands seem to have sort of had stopped following the expected convention in `mc` to differentiate *probe.Error. To keep things readable this PR is the first attempt at such a cleanup.
This commit is contained in:
@ -85,7 +85,7 @@ func mainAdminSpeedTestObject(ctx *cli.Context, aliasedURL string) error {
|
||||
// in all other scenarios keep auto-tuning on.
|
||||
autotune := !ctx.IsSet("concurrent")
|
||||
|
||||
resultCh, speedTestErr := client.Speedtest(ctxt, madmin.SpeedtestOpts{
|
||||
resultCh, e := client.Speedtest(ctxt, madmin.SpeedtestOpts{
|
||||
Size: int(size),
|
||||
Duration: duration,
|
||||
Concurrency: concurrent,
|
||||
@ -94,10 +94,10 @@ func mainAdminSpeedTestObject(ctx *cli.Context, aliasedURL string) error {
|
||||
})
|
||||
|
||||
if globalJSON {
|
||||
if speedTestErr != nil {
|
||||
if e != nil {
|
||||
printMsg(speedTestResult{
|
||||
Type: objectSpeedTest,
|
||||
Err: speedTestErr.Error(),
|
||||
Err: e.Error(),
|
||||
Final: true,
|
||||
})
|
||||
return nil
|
||||
@ -134,10 +134,10 @@ func mainAdminSpeedTestObject(ctx *cli.Context, aliasedURL string) error {
|
||||
}()
|
||||
|
||||
go func() {
|
||||
if speedTestErr != nil {
|
||||
if e != nil {
|
||||
p.Send(speedTestResult{
|
||||
Type: objectSpeedTest,
|
||||
Err: speedTestErr.Error(),
|
||||
Err: e.Error(),
|
||||
Final: true,
|
||||
})
|
||||
return
|
||||
|
Reference in New Issue
Block a user