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

Method Error

diagnostic.go:101–103  ·  diagnostic.go::Diagnostic.Error

error implementation, so that diagnostics can be returned via APIs that normally deal in vanilla Go errors. This presents only minimal context about the error, for compatibility with usual expectations about how errors will present as strings.

()

Source from the content-addressed store, hash-verified

99// This presents only minimal context about the error, for compatibility
100// with usual expectations about how errors will present as strings.
101func (d *Diagnostic) Error() string {
102 return fmt.Sprintf("%s: %s; %s", d.Subject, d.Summary, d.Detail)
103}
104
105// error implementation, so that sets of diagnostics can be returned via
106// APIs that normally deal in vanilla Go errors.

Callers 15

IndexFunction · 0.45
TestApplyPathFunction · 0.45
TestIndexFunction · 0.45
ErrorMethod · 0.45
TestDecodeBodyFunction · 0.45
TestDecodeExpressionFunction · 0.45
DecodeExpressionFunction · 0.45
TestMainFunction · 0.45
TestSpecFunction · 0.45

Calls

no outgoing calls

Tested by 15

TestApplyPathFunction · 0.36
TestIndexFunction · 0.36
TestDecodeBodyFunction · 0.36
TestDecodeExpressionFunction · 0.36
TestMainFunction · 0.36
TestSpecFunction · 0.36
TestStaticExpressionListFunction · 0.36
TestAllBoolExpressionsFunction · 0.36