diff options
| author | Paul Buetow <paul@buetow.org> | 2021-08-12 10:56:36 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2021-08-12 10:56:36 +0300 |
| commit | 3cc8887885f24a3f0d607af24197bc364ab16b8d (patch) | |
| tree | 48e85a54d3e4f6139001a58a3e57dd03b27c780a /internal/version | |
| parent | 1e00c256842e125a865a6cc3f9aa70a1a498f6dc (diff) | |
add missing brush and also add color client configs plus jsonschema
Diffstat (limited to 'internal/version')
| -rw-r--r-- | internal/version/version.go | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/internal/version/version.go b/internal/version/version.go index 7cfe12c..3e683bd 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -26,7 +26,7 @@ func String() string { // PaintedString is a prettier string representation of the DTail version. func PaintedString() string { - if !config.Client.TermColorsEnabled { + if !config.Client.TermColorsEnable { return String() } @@ -45,8 +45,13 @@ func PaintedString() string { return fmt.Sprintf("%s%v%s%s", name, version, protocol, additional) } +// Print the version. +func Print() { + fmt.Println(PaintedString()) +} + // PrintAndExit prints the program version and exists. func PrintAndExit() { - fmt.Println(PaintedString()) + Print() os.Exit(0) } |
