From fa49c69793b65747526f05d84e07de9cd9b5ffba Mon Sep 17 00:00:00 2001 From: James Bardin Date: Wed, 3 May 2017 17:54:47 -0400 Subject: [PATCH] expose Version.NewerThan NewerThan is useful outside of the package --- plugin/discovery/meta_set.go | 2 +- plugin/discovery/version.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin/discovery/meta_set.go b/plugin/discovery/meta_set.go index 066870e6e..9fc0abb09 100644 --- a/plugin/discovery/meta_set.go +++ b/plugin/discovery/meta_set.go @@ -100,7 +100,7 @@ func (s PluginMetaSet) Newest() PluginMeta { panic(err) } - if first == true || version.newerThan(winnerVersion) { + if first == true || version.NewerThan(winnerVersion) { winner = p winnerVersion = version first = false diff --git a/plugin/discovery/version.go b/plugin/discovery/version.go index 160a969b0..f2706bd53 100644 --- a/plugin/discovery/version.go +++ b/plugin/discovery/version.go @@ -32,6 +32,6 @@ func (v Version) String() string { return v.raw.String() } -func (v Version) newerThan(other Version) bool { +func (v Version) NewerThan(other Version) bool { return v.raw.GreaterThan(other.raw) }