mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-12-21 10:18:32 +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
|
|
}
|