Skip to content

Commit dbd46b6

Browse files
committed
rename var
1 parent 63af914 commit dbd46b6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

internal/convert/convert.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,12 +266,12 @@ func extractTagsLabelsDynamicBlock(resourceb *hclwrite.Body, name string) (hclwr
266266
fmt.Sprintf("%s.%s", name, nValue), nValue))
267267
forExpr := strings.TrimSpace(fmt.Sprintf("for key, value in %s : %s => %s",
268268
collectionExpr, keyExpr, valueExpr))
269-
tokenDynamic := hcl.TokensObjectFromExpr(forExpr)
269+
tokens := hcl.TokensObjectFromExpr(forExpr)
270270
if keyExpr == nKey && valueExpr == nValue { // expression can be simplified and use for_each expression
271-
tokenDynamic = hcl.TokensFromExpr(collectionExpr)
271+
tokens = hcl.TokensFromExpr(collectionExpr)
272272
}
273273
resourceb.RemoveBlock(d.block)
274-
return tokenDynamic, nil
274+
return tokens, nil
275275
}
276276

277277
func extractTagsLabelsIndividual(resourceb *hclwrite.Body, name string) (hclwrite.Tokens, error) {

internal/hcl/hcl.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func TokensObjectFromExpr(expr string) hclwrite.Tokens {
114114
return encloseBraces(tokens)
115115
}
116116

117-
// TokensFuncMerge created the tokens for the HCL merge function.
117+
// TokensFuncMerge creates the tokens for the HCL merge function.
118118
func TokensFuncMerge(tokens ...hclwrite.Tokens) hclwrite.Tokens {
119119
params := hclwrite.Tokens{tokenNewLine}
120120
params = append(params, joinTokens(tokens...)...)

0 commit comments

Comments
 (0)