diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-10 20:01:15 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-10 20:01:15 +0200 |
| commit | 71e431af2e65196ad4e7bc3404e772b1726d3338 (patch) | |
| tree | 935e3b1af7c5b0033caf13ea00cf9655686b6ec9 /internal/version | |
| parent | f6e23930da2900c43a5389a2e7d1e38d8221a76f (diff) | |
Introduce client runtime boundaries
Diffstat (limited to 'internal/version')
| -rw-r--r-- | internal/version/version.go | 13 |
1 files changed, 6 insertions, 7 deletions
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) } |
