From 0d9f1e344a629e5abcd6a385952d22d19555f125 Mon Sep 17 00:00:00 2001 From: Antonio Murdaca Date: Thu, 17 Dec 2015 11:52:23 +0100 Subject: [PATCH] pkg: version: add String method Signed-off-by: Antonio Murdaca --- pkg/version/version.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkg/version/version.go b/pkg/version/version.go index bd5ec7a835..c001279f9a 100644 --- a/pkg/version/version.go +++ b/pkg/version/version.go @@ -37,6 +37,11 @@ func (v Version) compareTo(other Version) int { return 0 } +// String returns the version string +func (v Version) String() string { + return string(v) +} + // LessThan checks if a version is less than another func (v Version) LessThan(other Version) bool { return v.compareTo(other) == -1