mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-11-10 08:21:24 +00:00
11 lines
250 B
Go
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
|
|
}
|