Append appends a new error to a Diagnostics and return the whole Diagnostics. This is provided as a convenience for returning from a function that collects and then returns a set of diagnostics: return nil, diags.Append(&hcl.Diagnostic{ ... }) Note that this modifies the array underlying the dia
(diag *Diagnostic)
| 127 | // must be used carefully within a single codepath. It is incorrect (and rude) |
| 128 | // to extend a diagnostics created by a different subsystem. |
| 129 | func (d Diagnostics) Append(diag *Diagnostic) Diagnostics { |
| 130 | return append(d, diag) |
| 131 | } |
| 132 | |
| 133 | // Extend concatenates the given Diagnostics with the receiver and returns |
| 134 | // the whole new Diagnostics. |
no outgoing calls