mirror of
https://github.com/containers/skopeo.git
synced 2025-09-24 19:37:39 +00:00
Bump github.com/containers/image/v5 from 5.3.1 to 5.4.0
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.3.1 to 5.4.0. - [Release notes](https://github.com/containers/image/releases) - [Commits](https://github.com/containers/image/compare/v5.3.1...v5.4.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Signed-off-by: Miloslav Trmač <mitr@redhat.com>
This commit is contained in:
committed by
Miloslav Trmač
parent
bd20786c38
commit
325327dc3f
15
vendor/github.com/vbauerster/mpb/v5/internal/percentage.go
generated
vendored
Normal file
15
vendor/github.com/vbauerster/mpb/v5/internal/percentage.go
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
package internal
|
||||
|
||||
import "math"
|
||||
|
||||
// Percentage is a helper function, to calculate percentage.
|
||||
func Percentage(total, current int64, width int) float64 {
|
||||
if total <= 0 {
|
||||
return 0
|
||||
}
|
||||
return float64(int64(width)*current) / float64(total)
|
||||
}
|
||||
|
||||
func PercentageRound(total, current int64, width int) float64 {
|
||||
return math.Round(Percentage(total, current, width))
|
||||
}
|
Reference in New Issue
Block a user