refactor: change type of percentage to float64

This commit is contained in:
Andy Hsu
2023-10-04 20:59:11 +08:00
parent 7db3975b18
commit ea9a3432ab
27 changed files with 66 additions and 55 deletions

View File

@ -274,7 +274,7 @@ func (d *BaiduNetdisk) Put(ctx context.Context, dstDir model.Obj, stream model.F
if err != nil {
return err
}
up(int(threadG.Success()) * 100 / len(precreateResp.BlockList))
up(float64(threadG.Success()) * 100 / float64(len(precreateResp.BlockList)))
precreateResp.BlockList[i] = -1
return nil
})