diff --git a/version.go b/version.go index 6ec2fd9..008dcb6 100644 --- a/version.go +++ b/version.go @@ -36,10 +36,12 @@ func (v *Version) String() string { v.buf = &bytes.Buffer{} segments := v.Segments() - if len(segments) > 0 { - v.buf.WriteRune('v') + if len(segments) == 0 { + return "" } + v.buf.WriteRune('v') + for i, s := range segments { fmt.Fprint(v.buf, strconv.Itoa(s)) if i < len(segments)-1 {