Skip to content

Commit

Permalink
Fix up list example.
Browse files Browse the repository at this point in the history
  • Loading branch information
cam-stitt committed Oct 30, 2017
1 parent c41e59c commit 9bd1157
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion examples/input.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"i": ${i},
"j": "${join(", ", h)}",
"other": "${upper("foobar")}",
"foo": "${list("foo", "bar")}"
"foo": "${join(" | ", list("foo", "bar"))}"
}
3 changes: 2 additions & 1 deletion examples/input.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
${i}:
- ${join(", ", h)}
- ${join(", ", h)}
- ${join(", ", list("Foo", "Bar"))}
2 changes: 1 addition & 1 deletion interpolation/lists.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ func interpolationFuncConcat() ast.Function {
}
}
}
fmt.Printf("%#v", result)

return result, nil
},
}
Expand Down
3 changes: 0 additions & 3 deletions template/template.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,6 @@ func (t *Template) Render(text string) (hil.EvaluationResult, error) {
return hil.InvalidResult, err
}

if err != nil {
return hil.InvalidResult, err
}
result, err := hil.Eval(tree, t.buildConfig())
if err != nil {
return hil.InvalidResult, err
Expand Down

0 comments on commit 9bd1157

Please sign in to comment.