1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #18745 from runcom/pkg-version-String

pkg: version: add String method
This commit is contained in:
Tibor Vass 2015-12-17 16:58:41 +01:00
commit 9681f0f0d4

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