Re: [Xen-devel] [PATCH 14/24] golang/xenlight: generate structs from the IDL

2019-11-14 Thread Nick Rosbrook
> BTW I was discussing with Ian Jackson, and I think at some point it > would be worth considering adding in an annotation or something to the > IDL such that the generator can use time.Duration for these things. > That opens up another can of works, like the fact that Duration is > int64 rather

Re: [Xen-devel] [PATCH 14/24] golang/xenlight: generate structs from the IDL

2019-11-14 Thread George Dunlap
On 10/7/19 4:13 PM, Nick Rosbrook wrote: > From: Nick Rosbrook > > Add struct and keyed union generation to gengotypes.py. For keyed unions, > use a method similar to gRPC's oneof to interpret C unions as Go types. > Meaning, for a given struct with a union field, generate a struct for > each

[Xen-devel] [PATCH 14/24] golang/xenlight: generate structs from the IDL

2019-10-07 Thread Nick Rosbrook
From: Nick Rosbrook Add struct and keyed union generation to gengotypes.py. For keyed unions, use a method similar to gRPC's oneof to interpret C unions as Go types. Meaning, for a given struct with a union field, generate a struct for each sub-struct defined in the union. Then, define an