Can you generate XML dynamically in GO? Instead of using a struct and then doing .Encode
on it?
So something like you can do in Python by using lxml. As in building one Element after another manually and dynamically as needed.
This way I can add only the fields/elements I need based on custom logic.