Skip to content

Commit 00f9d35

Browse files
committed
Remove else after return statement
1 parent 558661e commit 00f9d35

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

commands/instances.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -211,15 +211,15 @@ func UpdateIndex(ctx context.Context, req *rpc.UpdateIndexReq, downloadCB Downlo
211211

212212
if _, err := packageindex.LoadIndexNoSign(pathJson); err != nil {
213213
return nil, fmt.Errorf("invalid package index in %s: %s", pathJson, err)
214-
} else {
215-
fi, _ := os.Stat(x)
216-
downloadCB(&rpc.DownloadProgress{
217-
File: "Updating index: " + pathJson.Base(),
218-
TotalSize: fi.Size(),
219-
})
220-
downloadCB(&rpc.DownloadProgress{Completed: true})
221214
}
222215

216+
fi, _ := os.Stat(x)
217+
downloadCB(&rpc.DownloadProgress{
218+
File: "Updating index: " + pathJson.Base(),
219+
TotalSize: fi.Size(),
220+
})
221+
downloadCB(&rpc.DownloadProgress{Completed: true})
222+
223223
}
224224

225225
urls := []string{globals.DefaultIndexURL}

0 commit comments

Comments
 (0)