Error is a pretty bad format for these errors. Try to avoid using this.
()
| 47 | |
| 48 | // Error is a pretty bad format for these errors. Try to avoid using this. |
| 49 | func (e *DiagnosticError) Error() string { |
| 50 | var diags hcl.Diagnostics |
| 51 | diags = diags.Extend(e.Diagnostics) |
| 52 | for _, d := range e.KeyedDiagnostics { |
| 53 | diags = diags.Extend(d) |
| 54 | } |
| 55 | |
| 56 | return diags.Error() |
| 57 | } |
| 58 | |
| 59 | func (e *DiagnosticError) HasError() bool { |
| 60 | if e.Diagnostics.HasErrors() { |