Add dash separator to version suffix

This commit is contained in:
Juan Carlos Mejías Rodríguez 2019-07-21 22:50:55 -04:00
parent 1b27073491
commit 7877eec67d

View File

@ -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 {