go-qemu
go-qemu copied to clipboard
Fix `simpleunion` marshall
The version in master does not unwrap the inner type in type definitions when marshalling to JSON. This results in infinite recursion that eventually exhausts the stack.
This PR fixes the template to perform this unwrapping, so that marshalling these types works. I have also added simple regression test to make sure one of the simpleunion
can indeed be marshalled.