diff options
Diffstat (limited to 'vendor/github.com/hashicorp/terraform/tfdiags/simple_warning.go')
-rw-r--r-- | vendor/github.com/hashicorp/terraform/tfdiags/simple_warning.go | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/vendor/github.com/hashicorp/terraform/tfdiags/simple_warning.go b/vendor/github.com/hashicorp/terraform/tfdiags/simple_warning.go new file mode 100644 index 0000000..fb3ac98 --- /dev/null +++ b/vendor/github.com/hashicorp/terraform/tfdiags/simple_warning.go | |||
@@ -0,0 +1,25 @@ | |||
1 | package tfdiags | ||
2 | |||
3 | type simpleWarning string | ||
4 | |||
5 | var _ Diagnostic = simpleWarning("") | ||
6 | |||
7 | // SimpleWarning constructs a simple (summary-only) warning diagnostic. | ||
8 | func SimpleWarning(msg string) Diagnostic { | ||
9 | return simpleWarning(msg) | ||
10 | } | ||
11 | |||
12 | func (e simpleWarning) Severity() Severity { | ||
13 | return Warning | ||
14 | } | ||
15 | |||
16 | func (e simpleWarning) Description() Description { | ||
17 | return Description{ | ||
18 | Summary: string(e), | ||
19 | } | ||
20 | } | ||
21 | |||
22 | func (e simpleWarning) Source() Source { | ||
23 | // No source information available for a native error | ||
24 | return Source{} | ||
25 | } | ||