package tfdiags
+import (
+ "github.com/hashicorp/hcl2/hcl"
+)
+
type Diagnostic interface {
Severity() Severity
Description() Description
Source() Source
+
+ // FromExpr returns the expression-related context for the diagnostic, if
+ // available. Returns nil if the diagnostic is not related to an
+ // expression evaluation.
+ FromExpr() *FromExpr
}
type Severity rune
Subject *SourceRange
Context *SourceRange
}
+
+type FromExpr struct {
+ Expression hcl.Expression
+ EvalContext *hcl.EvalContext
+}