Re: [PATCH v2 08/11] qapi: golang: Generate qapi's event types in Go

2023-11-10 Thread Andrea Bolognani
On Thu, Nov 09, 2023 at 08:13:38PM +0100, Victor Toso wrote: > On Thu, Nov 09, 2023 at 09:59:50AM -0800, Andrea Bolognani wrote: > > Now, I'm not sure I would go as far as suggesting that the > > GetName() function should be completely removed, but maybe we > > can try leaving it out from the initi

Re: [PATCH v2 08/11] qapi: golang: Generate qapi's event types in Go

2023-11-09 Thread Victor Toso
Hi, On Thu, Nov 09, 2023 at 09:59:50AM -0800, Andrea Bolognani wrote: > On Mon, Oct 16, 2023 at 05:27:01PM +0200, Victor Toso wrote: > > This patch handles QAPI event types and generates data structures in > > Go that handles it. > > > > We also define a Event interface and two helper functions Ma

Re: [PATCH v2 08/11] qapi: golang: Generate qapi's event types in Go

2023-11-09 Thread Andrea Bolognani
On Mon, Oct 16, 2023 at 05:27:01PM +0200, Victor Toso wrote: > This patch handles QAPI event types and generates data structures in > Go that handles it. > > We also define a Event interface and two helper functions MarshalEvent > and UnmarshalEvent. > > Example: > qapi: > | { 'event': 'MEMORY_DEV

[PATCH v2 08/11] qapi: golang: Generate qapi's event types in Go

2023-10-16 Thread Victor Toso
This patch handles QAPI event types and generates data structures in Go that handles it. We also define a Event interface and two helper functions MarshalEvent and UnmarshalEvent. Example: qapi: | { 'event': 'MEMORY_DEVICE_SIZE_CHANGE', | 'data': { '*id': 'str', 'size': 'size', 'qom-path' : '