Re: [PATCH v3 1/8] qapi: golang: Generate enum type

2025-01-17 Thread Victor Toso
Hi, On Fri, Jan 17, 2025 at 10:10:51AM +, Daniel P. Berrangé wrote: > On Fri, Jan 10, 2025 at 11:49:39AM +0100, Victor Toso wrote: > > This patch handles QAPI enum types and generates its equivalent in Go. > > We sort the output based on enum's type name. > > > > Enums are being handled as st

Re: [PATCH v3 1/8] qapi: golang: Generate enum type

2025-01-17 Thread Daniel P . Berrangé
On Fri, Jan 10, 2025 at 11:49:39AM +0100, Victor Toso wrote: > This patch handles QAPI enum types and generates its equivalent in Go. > We sort the output based on enum's type name. > > Enums are being handled as strings in Golang. > > 1. For each QAPI enum, we will define a string type in Go to

Re: [PATCH v3 1/8] qapi: golang: Generate enum type

2025-01-14 Thread Daniel P . Berrangé
On Tue, Jan 14, 2025 at 09:52:23AM +0100, Markus Armbruster wrote: > Victor Toso writes: > > > This patch handles QAPI enum types and generates its equivalent in Go. > > We sort the output based on enum's type name. > > Any particular reason for sorting? > > The existing backends generate outpu

Re: [PATCH v3 1/8] qapi: golang: Generate enum type

2025-01-14 Thread Victor Toso
Hi, On Tue, Jan 14, 2025 at 09:52:23AM +0100, Markus Armbruster wrote: > Victor Toso writes: > > > This patch handles QAPI enum types and generates its equivalent in Go. > > We sort the output based on enum's type name. > > Any particular reason for sorting? It was a request from Daniel that I

Re: [PATCH v3 1/8] qapi: golang: Generate enum type

2025-01-14 Thread Markus Armbruster
Victor Toso writes: > This patch handles QAPI enum types and generates its equivalent in Go. > We sort the output based on enum's type name. Any particular reason for sorting? The existing backends generate output it source order, on the (bold?) assumption that developers care to pick an order

[PATCH v3 1/8] qapi: golang: Generate enum type

2025-01-10 Thread Victor Toso
This patch handles QAPI enum types and generates its equivalent in Go. We sort the output based on enum's type name. Enums are being handled as strings in Golang. 1. For each QAPI enum, we will define a string type in Go to be the assigned type of this specific enum. 2. Naming: CamelCase will