diff options
Diffstat (limited to 'compare')
-rw-r--r-- | compare/compare.go (renamed from compare/eq.go) | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/compare/eq.go b/compare/compare.go index 6120c0bf2..19a5deaa2 100644 --- a/compare/eq.go +++ b/compare/compare.go @@ -19,3 +19,11 @@ package compare type Eqer interface { Eq(other interface{}) bool } + +// Comparer can be used to compare two values. +// This will be used when using the le, ge etc. operators in the templates. +// Compare returns -1 if the given version is less than, 0 if equal and 1 if greater than +// the running version. +type Comparer interface { + Compare(other interface{}) int +} |