You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm interested in writing a program to update a config file, while preserving the comments in that file. This requires calling ParseBytes() or equivalent and then manipulating the resulting *ast.File. This is a little cumbersome. I added some helpers for getting/setting keys, in this gist:
They assume the data has a little more structure than HCL provides - no listing two keys for a given ObjectList for example. But they significantly simplify the task of manipulating the AST, which is why I thought you might be interested in adding something like this to the project.
The text was updated successfully, but these errors were encountered:
Hi,
I'm interested in writing a program to update a config file, while preserving the comments in that file. This requires calling
ParseBytes()
or equivalent and then manipulating the resulting*ast.File
. This is a little cumbersome. I added some helpers for getting/setting keys, in this gist:https://gist.github.com/kevinburke/477ca3a49d67f886cd2ade96a2abaf2a
They assume the data has a little more structure than HCL provides - no listing two keys for a given ObjectList for example. But they significantly simplify the task of manipulating the AST, which is why I thought you might be interested in adding something like this to the project.
The text was updated successfully, but these errors were encountered: