Skip to content

Commit

Permalink
fix linting issue for - add hcl2 support
Browse files Browse the repository at this point in the history
  • Loading branch information
boranx committed Sep 17, 2019
1 parent 8158b68 commit 8c58044
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/parser/hcl2/convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,9 @@ func (c *converter) convertTemplateConditional(expr *hclsyntax.ConditionalExpr)
}
builder.WriteString(trueResult)
falseResult, err := c.convertStringPart(expr.FalseResult)
if err != nil {
return "", nil
}
if len(falseResult) > 0 {
builder.WriteString("%{else}")
builder.WriteString(falseResult)
Expand Down

0 comments on commit 8c58044

Please sign in to comment.