From 0945da8dfefcbb723eecea0e5f4eafff63398253 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Paul=20B=C3=BCtow?= Date: Sun, 26 Jan 2020 11:26:53 +0000 Subject: Introduce drun command, refactor code to use context package --- internal/version/version.go | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'internal/version/version.go') diff --git a/internal/version/version.go b/internal/version/version.go index 3a4a5dc..3c057df 100644 --- a/internal/version/version.go +++ b/internal/version/version.go @@ -7,18 +7,20 @@ import ( "github.com/mimecast/dtail/internal/color" ) -// Name of DTail. -const Name = "DTail" - -// Version of DTail. -const Version = "1.1.0" - -// Additional information. -const Additional = "" +const ( + // Name of DTail. + Name string = "DTail" + // Version of DTail. + Version string = "2.0.0" + // Additional information for DTail + Additional string = "" + // ProtocolCompat -ibility version. + ProtocolCompat string = "2" +) // String representation of the DTail version. func String() string { - return fmt.Sprintf("%s v%v %s", Name, Version, Additional) + return fmt.Sprintf("%s %v Protocol %s %s", Name, Version, ProtocolCompat, Additional) } // PaintedString is a prettier string representation of the DTail version. @@ -30,7 +32,7 @@ func PaintedString() string { version := color.Paint(color.Blue, Version) descr := color.Paint(color.Green, Additional) - return fmt.Sprintf("%s %v %s", name, version, descr) + return fmt.Sprintf("%s %v Protocol %s %s", name, version, ProtocolCompat, descr) } // PrintAndExit prints the program version and exists. -- cgit v1.2.3