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:
14
vendor/github.com/charmbracelet/x/ansi/util.go
generated
vendored
14
vendor/github.com/charmbracelet/x/ansi/util.go
generated
vendored
@ -90,3 +90,17 @@ func XParseColor(s string) color.Color {
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
type ordered interface {
|
||||
~int | ~int8 | ~int16 | ~int32 | ~int64 |
|
||||
~uint | ~uint8 | ~uint16 | ~uint32 | ~uint64 | ~uintptr |
|
||||
~float32 | ~float64 |
|
||||
~string
|
||||
}
|
||||
|
||||
func max[T ordered](a, b T) T { //nolint:predeclared
|
||||
if a > b {
|
||||
return a
|
||||
}
|
||||
return b
|
||||
}
|
||||
|
Reference in New Issue
Block a user