mirror of
https://github.com/podman-container-tools/podman.git
synced 2026-08-06 08:55:44 +00:00
Also update to c/image after https://github.com/containers/image/pull/1821 , so that we don't ship two versions of the package simultaneously. [NO NEW TESTS NEEDED] Signed-off-by: Miloslav Trmač <mitr@redhat.com>
10 lines
250 B
Go
10 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
|
|
}
|