Skip to content

Newb trying to get output-map working with external template #1676

Closed Answered by hairyhenderson
dgarlitt asked this question in Q&A
Discussion options

You must be logged in to vote

Many thanks to @thesuperzapper, who pointed out that the doc bug is that the context (.) needs to be passed to the template function for the example to work:

So, the correct command is:

gomplate -t out=out.t -c filemap.json --input-dir=in --output-map='{{ template "out" . }}'

The docs are fixed in #1745

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@hairyhenderson
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by hairyhenderson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants