feat(aa-log): add less & equals rule methods.
This commit is contained in:
parent
923bb66eba
commit
e23e10d7b7
17 changed files with 394 additions and 86 deletions
|
|
@ -10,3 +10,18 @@ type IOUring struct {
|
|||
Label string
|
||||
}
|
||||
|
||||
func (r *IOUring) Less(other any) bool {
|
||||
o, _ := other.(*IOUring)
|
||||
if r.Qualifier.Equals(o.Qualifier) {
|
||||
if r.Access == o.Access {
|
||||
return r.Label < o.Label
|
||||
}
|
||||
return r.Access < o.Access
|
||||
}
|
||||
return r.Qualifier.Less(o.Qualifier)
|
||||
}
|
||||
|
||||
func (r *IOUring) Equals(other any) bool {
|
||||
o, _ := other.(*IOUring)
|
||||
return r.Access == o.Access && r.Label == o.Label && r.Qualifier.Equals(o.Qualifier)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue