mirror of
https://github.com/opentofu/opentofu.git
synced 2025-01-02 12:17:39 -06:00
05caff2ca3
This is part of a general effort to move all of Terraform's non-library package surface under internal in order to reinforce that these are for internal use within Terraform only. If you were previously importing packages under this prefix into an external codebase, you could pin to an earlier release tag as an interim solution until you've make a plan to achieve the same functionality some other way.
31 lines
617 B
Go
31 lines
617 B
Go
package tfdiags
|
|
|
|
type simpleWarning string
|
|
|
|
var _ Diagnostic = simpleWarning("")
|
|
|
|
// SimpleWarning constructs a simple (summary-only) warning diagnostic.
|
|
func SimpleWarning(msg string) Diagnostic {
|
|
return simpleWarning(msg)
|
|
}
|
|
|
|
func (e simpleWarning) Severity() Severity {
|
|
return Warning
|
|
}
|
|
|
|
func (e simpleWarning) Description() Description {
|
|
return Description{
|
|
Summary: string(e),
|
|
}
|
|
}
|
|
|
|
func (e simpleWarning) Source() Source {
|
|
// No source information available for a simple warning
|
|
return Source{}
|
|
}
|
|
|
|
func (e simpleWarning) FromExpr() *FromExpr {
|
|
// Simple warnings are not expression-related
|
|
return nil
|
|
}
|