Skip to content

Safely producing TOML #1194

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

You must be logged in to vote

Hi @ShellWowza, thanks for posting this question.

There's an example that's related to what you're looking for in the docs which might help.

Internally the ds/datasource function will convert from YAML to an internal object representation, so you don't need to parse the YAML at all. Something like this should work:

$ gomplate -d in=./inputfile.yaml -i '{{ ds "in" | data.ToTOML }}'

Why don't you try that out and see if it works for you - and please post back!

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

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

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
None yet
3 participants