From 71e431af2e65196ad4e7bc3404e772b1726d3338 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Tue, 10 Mar 2026 20:01:15 +0200 Subject: Introduce client runtime boundaries --- internal/version/version.go | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'internal/version') diff --git a/internal/version/version.go b/internal/version/version.go index 05bd28f..bffdccd 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -5,7 +5,6 @@ import ( "os" "github.com/mimecast/dtail/internal/color" - "github.com/mimecast/dtail/internal/config" "github.com/mimecast/dtail/internal/protocol" ) @@ -25,8 +24,8 @@ func String() string { } // PaintedString is a prettier string representation of the DTail version. -func PaintedString() string { - if !config.Client.TermColorsEnable { +func PaintedString(colorsEnabled bool) string { + if !colorsEnabled { return String() } @@ -43,12 +42,12 @@ func PaintedString() string { } // Print the version. -func Print() { - fmt.Println(PaintedString()) +func Print(colorsEnabled bool) { + fmt.Println(PaintedString(colorsEnabled)) } // PrintAndExit prints the program version and exists. -func PrintAndExit() { - Print() +func PrintAndExit(colorsEnabled bool) { + Print(colorsEnabled) os.Exit(0) } -- cgit v1.2.3