NewPolicy creates a new Policy instance with an ID associated with the YAML node.
(node *yaml.Node)
| 646 | |
| 647 | // NewPolicy creates a new Policy instance with an ID associated with the YAML node. |
| 648 | func (p *parserImpl) NewPolicy(node *yaml.Node) (*Policy, int64) { |
| 649 | policy := NewPolicy(p.src, p.info) |
| 650 | id := p.CollectMetadata(node) |
| 651 | return policy, id |
| 652 | } |
| 653 | |
| 654 | // NewRule creates a new Rule instance with an ID associated with the YAML node. |
| 655 | func (p *parserImpl) NewRule(node *yaml.Node) (*Rule, int64) { |
nothing calls this directly
no test coverage detected