This commit is contained in:
18
vendor/github.com/charmbracelet/x/ansi/util.go
generated
vendored
18
vendor/github.com/charmbracelet/x/ansi/util.go
generated
vendored
@ -10,7 +10,7 @@ import (
|
||||
)
|
||||
|
||||
// colorToHexString returns a hex string representation of a color.
|
||||
func colorToHexString(c color.Color) string {
|
||||
func colorToHexString(c color.Color) string { //nolint:unused
|
||||
if c == nil {
|
||||
return ""
|
||||
}
|
||||
@ -28,7 +28,7 @@ func colorToHexString(c color.Color) string {
|
||||
// rgbToHex converts red, green, and blue values to a hexadecimal value.
|
||||
//
|
||||
// hex := rgbToHex(0, 0, 255) // 0x0000FF
|
||||
func rgbToHex(r, g, b uint32) uint32 {
|
||||
func rgbToHex(r, g, b uint32) uint32 { //nolint:unused
|
||||
return r<<16 + g<<8 + b
|
||||
}
|
||||
|
||||
@ -90,17 +90,3 @@ 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