spiegel_podman/vendor/github.com/vbauerster/mpb/v6/internal/width.go
Matthew Heon 2816c55f3a Update all containers/ project vendors
Bumps:
- c/storage to v1.29.0
- c/image to v5.11.0
- c/common to v0.36.0
- Buildah to v1.20.1

Signed-off-by: Matthew Heon <mheon@redhat.com>
2021-04-16 11:07:33 -04:00

10 lines
251 B
Go

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