pkg: version: add String method

Signed-off-by: Antonio Murdaca <runcom@redhat.com>
Upstream-commit: 0d9f1e344a629e5abcd6a385952d22d19555f125
Component: engine
This commit is contained in:
Antonio Murdaca
2015-12-17 11:52:23 +01:00
parent 7c30c7ccac
commit babed83c58

View File

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