0
0
forked from toolshed/abra

build: go 1.24

We were running behind and there were quite some deprecations to update.
This was mostly in the upstream copy/pasta package but seems quite
minimal.
This commit is contained in:
2025-03-16 12:04:32 +01:00
parent a2b678caf6
commit 1723025fbf
822 changed files with 25433 additions and 197407 deletions

38
vendor/github.com/charmbracelet/x/cellbuf/utils.go generated vendored Normal file
View File

@ -0,0 +1,38 @@
package cellbuf
import (
"strings"
)
// Height returns the height of a string.
func Height(s string) int {
return strings.Count(s, "\n") + 1
}
func min(a, b int) int { //nolint:predeclared
if a > b {
return b
}
return a
}
func max(a, b int) int { //nolint:predeclared
if a > b {
return a
}
return b
}
func clamp(v, low, high int) int {
if high < low {
low, high = high, low
}
return min(high, max(low, v))
}
func abs(a int) int {
if a < 0 {
return -a
}
return a
}