dns, change, noise, auth, capver: misc consolidation

This commit is contained in:
Kristoffer Dalby
2026-06-16 06:56:10 +00:00
parent ea5e52f662
commit 60f0544b78
10 changed files with 84 additions and 120 deletions
+1 -15
View File
@@ -11,21 +11,7 @@ import (
)
func main() {
var colors bool
switch l := termcolor.SupportLevel(os.Stderr); l {
case termcolor.Level16M:
colors = true
case termcolor.Level256:
colors = true
case termcolor.LevelBasic:
colors = true
case termcolor.LevelNone:
colors = false
default:
// no color, return text as is.
colors = false
}
colors := termcolor.SupportLevel(os.Stderr) != termcolor.LevelNone
// Adhere to no-color.org manifesto of allowing users to
// turn off color in cli/services