github.com/hashicorp/terraform-plugin-sdk@v1.17.2/internal/tfdiags/severity_string.go (about) 1 // Code generated by "stringer -type=Severity"; DO NOT EDIT. 2 3 package tfdiags 4 5 import "strconv" 6 7 func _() { 8 // An "invalid array index" compiler error signifies that the constant values have changed. 9 // Re-run the stringer command to generate them again. 10 var x [1]struct{} 11 _ = x[Error-69] 12 _ = x[Warning-87] 13 } 14 15 const ( 16 _Severity_name_0 = "Error" 17 _Severity_name_1 = "Warning" 18 ) 19 20 func (i Severity) String() string { 21 switch { 22 case i == 69: 23 return _Severity_name_0 24 case i == 87: 25 return _Severity_name_1 26 default: 27 return "Severity(" + strconv.FormatInt(int64(i), 10) + ")" 28 } 29 }