replaceResourceWithError removes a resource from the parser's internal state and adds a parse error for its paths instead.
(n ResourceName, err error, external bool)
| 1003 | |
| 1004 | // replaceResourceWithError removes a resource from the parser's internal state and adds a parse error for its paths instead. |
| 1005 | func (p *Parser) replaceResourceWithError(n ResourceName, err error, external bool) { |
| 1006 | r := p.Resources[n.Normalized()] |
| 1007 | p.deleteResource(r) |
| 1008 | for _, path := range r.Paths { |
| 1009 | p.addParseError(path, err, external) |
| 1010 | } |
| 1011 | } |
| 1012 | |
| 1013 | // addParseError adds a parse error to the p.Errors |
| 1014 | func (p *Parser) addParseError(path string, err error, external bool) { |
no test coverage detected