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

Method Append

diagnostic.go:129–131  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

127// must be used carefully within a single codepath. It is incorrect (and rude)
128// to extend a diagnostics created by a different subsystem.
129func (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.

Callers 9

JustAttributesMethod · 0.95
mergedContentMethod · 0.95
ApplyPathFunction · 0.95
DecodeFunction · 0.95
decodePosFromBodyMethod · 0.95
parseObjectFunction · 0.95
parseArrayFunction · 0.95
TestRefineValueSpecFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestRefineValueSpecFunction · 0.76