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:
25
vendor/github.com/muesli/termenv/profile.go
generated
vendored
25
vendor/github.com/muesli/termenv/profile.go
generated
vendored
@ -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)
|
||||
|
Reference in New Issue
Block a user