MCPcopy
hub / github.com/hashicorp/hcl / HasErrors

Method HasErrors

diagnostic.go:144–151  ·  diagnostic.go::Diagnostics.HasErrors

HasErrors returns true if the receiver contains any diagnostics of severity DiagError.

()

Source from the content-addressed store, hash-verified

142// HasErrors returns true if the receiver contains any diagnostics of
143// severity DiagError.
144func (d Diagnostics) HasErrors() bool {
145 for _, diag := range d {
146 if diag.Severity == DiagError {
147 return true
148 }
149 }
150 return false
151}
152
153func (d Diagnostics) Errs() []error {
154 var errs []error

Callers 15

TraverseRelMethod · 0.95
ApplyPathFunction · 0.95
DecodeFunction · 0.95
ValueMethod · 0.95
ValueMethod · 0.95
parseTraversalMethod · 0.95
parseBinaryOpsMethod · 0.95
parseExpressionTermMethod · 0.95
parseObjectConsMethod · 0.95

Calls

no outgoing calls

Tested by 15

TestRefineValueSpecFunction · 0.76
TestAbsTraversalForExprFunction · 0.64
TestRelTraversalForExprFunction · 0.64
TestApplyPathFunction · 0.64
TestIndexFunction · 0.64
TestAllBoolExpressionsFunction · 0.64
TestWalkFunction · 0.64
FuzzParseTemplateFunction · 0.64
FuzzParseTraversalAbsFunction · 0.64