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

View File

@ -12,16 +12,31 @@ import (
type Profile int
const (
// TrueColor, 24-bit color profile
// TrueColor, 24-bit color profile.
TrueColor = Profile(iota)
// ANSI256, 8-bit color profile
// ANSI256, 8-bit color profile.
ANSI256
// ANSI, 4-bit color profile
// ANSI, 4-bit color profile.
ANSI
// Ascii, uncolored profile
// Ascii, uncolored profile.
Ascii //nolint:revive
)
// Name returns the profile name as a string.
func (p Profile) Name() string {
switch p {
case Ascii:
return "Ascii"
case ANSI:
return "ANSI"
case ANSI256:
return "ANSI256"
case TrueColor:
return "TrueColor"
}
return "Unknown"
}
// String returns a new Style.
func (p Profile) String(s ...string) Style {
return Style{
@ -80,7 +95,7 @@ func (p Profile) Color(s string) Color {
return nil
}
if i < 16 {
if i < 16 { //nolint:mnd
c = ANSIColor(i)
} else {
c = ANSI256Color(i)