From 971254928aa27b716d609c0b0b5fbc1bfbc92c19 Mon Sep 17 00:00:00 2001 From: Adrien Delorme Date: Mon, 2 Nov 2020 17:43:21 +0100 Subject: [PATCH] various fixes --- hcl2template/common_test.go | 3 +-- hcl2template/types.variables.go | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/hcl2template/common_test.go b/hcl2template/common_test.go index 0d15e714b..a5c8b90bd 100644 --- a/hcl2template/common_test.go +++ b/hcl2template/common_test.go @@ -69,8 +69,7 @@ func testParse(t *testing.T, tests []parseTest) { if tt.parseWantDiagHasErrors != gotDiags.HasErrors() { t.Fatalf("Parser.parse() unexpected diagnostics HasErrors. %s", gotDiags) } - if diff := cmp.Diff(tt.parseWantCfg, gotCfg, cmpOpts..., - ); diff != "" { + if diff := cmp.Diff(tt.parseWantCfg, gotCfg, cmpOpts...); diff != "" { t.Fatalf("Parser.parse() wrong packer config. %s", diff) } diff --git a/hcl2template/types.variables.go b/hcl2template/types.variables.go index 5ffe57cdf..2f6303741 100644 --- a/hcl2template/types.variables.go +++ b/hcl2template/types.variables.go @@ -446,11 +446,11 @@ func decodeVariableValidationBlock(varName string, block *hcl.Block) (*VariableV // English, we'll require the given error message to conform // to that. We might relax this in future if e.g. we start // presenting these error messages in a different way, or if - // Terraform starts supporting producing error messages in + // Packer starts supporting producing error messages in // other human languages, etc. // For pragmatism we also allow sentences ending with // exclamation points, but we don't mention it explicitly here - // because that's not really consistent with the Terraform UI + // because that's not really consistent with the Packer UI // writing style. diags = diags.Append(&hcl.Diagnostic{ Severity: hcl.DiagError, @@ -485,7 +485,7 @@ func looksLikeSentences(s string) bool { // (This will only see the first rune in a multi-rune combining sequence, // but the first rune is generally the letter if any are, and if not then // we'll just ignore it because we're primarily expecting English messages - // right now anyway, for consistency with all of Terraform's other output.) + // right now anyway, for consistency with all of Packers's other output.) if unicode.IsLetter(first) && !unicode.IsUpper(first) { return false }