hcl: diagnosticTextWriter fix value reporting for 1-element collection

This commit is contained in:
Martin Atkins 2018-07-28 15:26:11 -07:00
parent 627c12b67c
commit 7cc8ebfacf

View File

@ -270,7 +270,7 @@ func (w *diagnosticTextWriter) valueStr(val cty.Value) string {
case 0: case 0:
return "empty " + ty.FriendlyName() return "empty " + ty.FriendlyName()
case 1: case 1:
return ty.FriendlyName() + "with 1 element" return ty.FriendlyName() + " with 1 element"
default: default:
return fmt.Sprintf("%s with %d elements", ty.FriendlyName(), l) return fmt.Sprintf("%s with %d elements", ty.FriendlyName(), l)
} }