feat(aa): add a string method to all rule struct.
This commit is contained in:
parent
e9fa0660f8
commit
5483668574
20 changed files with 337 additions and 34 deletions
|
|
@ -4,6 +4,12 @@
|
|||
|
||||
package aa
|
||||
|
||||
const (
|
||||
tokRLIMIT = "rlimit"
|
||||
tokSET = "set"
|
||||
)
|
||||
|
||||
|
||||
type Rlimit struct {
|
||||
RuleBase
|
||||
Key string
|
||||
|
|
@ -35,3 +41,7 @@ func (r *Rlimit) Equals(other any) bool {
|
|||
o, _ := other.(*Rlimit)
|
||||
return r.Key == o.Key && r.Op == o.Op && r.Value == o.Value
|
||||
}
|
||||
|
||||
func (r *Rlimit) String() string {
|
||||
return renderTemplate(tokRLIMIT, r)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue