feat(aa): add rule constructors from internal parser.
This commit is contained in:
parent
ac9d6d859f
commit
163c5be61c
19 changed files with 456 additions and 75 deletions
|
|
@ -31,6 +31,18 @@ type Capability struct {
|
|||
Names []string
|
||||
}
|
||||
|
||||
func newCapability(q Qualifier, rule rule) (Rule, error) {
|
||||
names, err := toValues(CAPABILITY, "name", rule.GetString())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &Capability{
|
||||
RuleBase: newBase(rule),
|
||||
Qualifier: q,
|
||||
Names: names,
|
||||
}, nil
|
||||
}
|
||||
|
||||
func newCapabilityFromLog(log map[string]string) Rule {
|
||||
return &Capability{
|
||||
RuleBase: newBaseFromLog(log),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue