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:
dependabot-preview[bot]
2020-03-31 20:14:19 +00:00
committed by Miloslav Trmač
parent bd20786c38
commit 325327dc3f
216 changed files with 22302 additions and 91646 deletions

View 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))
}