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,19 @@ type Include struct {
|
|||
IsMagic bool
|
||||
}
|
||||
|
||||
func (r *Include) Less(other any) bool {
|
||||
o, _ := other.(*Include)
|
||||
if r.Path == o.Path {
|
||||
if r.IsMagic == o.IsMagic {
|
||||
return r.IfExists
|
||||
}
|
||||
return r.IsMagic
|
||||
}
|
||||
return r.Path < o.Path
|
||||
}
|
||||
|
||||
func (r *Include) Equals(other any) bool {
|
||||
o, _ := other.(*Include)
|
||||
return r.Path == o.Path && r.IsMagic == o.IsMagic &&
|
||||
r.IfExists == o.IfExists
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue