Files
skopeo/vendor/github.com/vbauerster/mpb/v8/internal/width.go
Miloslav Trmač 643a2359e4 Update c/image after https://github.com/containers/image/pull/1816
... to work around some of the "unexpected EOF" failures.

Signed-off-by: Miloslav Trmač <mitr@redhat.com>
2023-02-09 20:36:27 +01:00

11 lines
250 B
Go

package internal
// CheckRequestedWidth checks that requested width doesn't overflow
// available width
func CheckRequestedWidth(requested, available int) int {
if requested < 1 || requested >= available {
return available
}
return requested
}