forked from mattn/anko
-
Notifications
You must be signed in to change notification settings - Fork 1
/
comparison.go
46 lines (36 loc) · 980 Bytes
/
comparison.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
package over
import "reflect"
type Comparison interface {
// Equals ==
Equals(interface{}) error
// Distinct !=
Distinct(interface{}) error
// Less <
Less(interface{}) error
// LessEquals <=
LessEquals(interface{}) error
// Greater >
Greater(interface{}) error
// GreaterEquals >=
GreaterEquals(interface{}) error
}
var ComparisonReflectType = reflect.TypeOf(new(Comparison)).Elem()
type ComparisonImpl struct{}
func (c *ComparisonImpl) Equals(_ interface{}) error {
return ErrMethodNotImplemented
}
func (c *ComparisonImpl) Distinct(_ interface{}) error {
return ErrMethodNotImplemented
}
func (c *ComparisonImpl) Less(_ interface{}) error {
return ErrMethodNotImplemented
}
func (c *ComparisonImpl) LessEquals(_ interface{}) error {
return ErrMethodNotImplemented
}
func (c *ComparisonImpl) Greater(_ interface{}) error {
return ErrMethodNotImplemented
}
func (c *ComparisonImpl) GreaterEquals(_ interface{}) error {
return ErrMethodNotImplemented
}