feat(aa): add merge methods to the rule interface.
This commit is contained in:
parent
a91e2ddf56
commit
6791dcde28
14 changed files with 192 additions and 11 deletions
|
|
@ -83,6 +83,11 @@ func (r RuleBase) Merge(other Rule) bool {
|
|||
return false
|
||||
}
|
||||
|
||||
func (r RuleBase) merge(other RuleBase) bool {
|
||||
r.Comment += " " + other.Comment
|
||||
return true
|
||||
}
|
||||
|
||||
type Qualifier struct {
|
||||
Audit bool
|
||||
AccessType string
|
||||
|
|
@ -102,3 +107,7 @@ func (r Qualifier) Compare(o Qualifier) int {
|
|||
}
|
||||
return compare(r.AccessType, o.AccessType)
|
||||
}
|
||||
|
||||
func (r Qualifier) Equal(o Qualifier) bool {
|
||||
return r.Audit == o.Audit && r.AccessType == o.AccessType
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue