From 7877eec67dcaa71414080607e69807e2b3aad9c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Carlos=20Mej=C3=ADas=20Rodr=C3=ADguez?= Date: Sun, 21 Jul 2019 22:50:55 -0400 Subject: [PATCH] Add dash separator to version suffix --- common/version.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/version.go b/common/version.go index 9a45879..1502983 100644 --- a/common/version.go +++ b/common/version.go @@ -38,7 +38,11 @@ type Version struct { } func (v Version) String() string { - return fmt.Sprintf("%d.%d.%d%s", v.Major, v.Minor, v.Patch, v.Suffix) + if v.Suffix != "" { + return fmt.Sprintf("%d.%d.%d-%s", v.Major, v.Minor, v.Patch, v.Suffix) + } else { + return fmt.Sprintf("%d.%d.%d", v.Major, v.Minor, v.Patch) + } } func BuildVersionString() string {