Re: [RFC PATCH v2 7/8] qapi: golang: Add CommandResult type to Go

2022-08-17 Thread Victor Toso
Hi, On Tue, Jul 05, 2022 at 05:49:22PM +0100, Daniel P. Berrangé wrote: > On Tue, Jul 05, 2022 at 08:46:21AM -0700, Andrea Bolognani wrote: > > On Fri, Jun 17, 2022 at 02:19:31PM +0200, Victor Toso wrote: > > > +type EmptyCommandReturn struct { > > > +CommandId string `json:"id,omitem

Re: [RFC PATCH v2 7/8] qapi: golang: Add CommandResult type to Go

2022-07-05 Thread Daniel P . Berrangé
On Tue, Jul 05, 2022 at 08:46:21AM -0700, Andrea Bolognani wrote: > On Fri, Jun 17, 2022 at 02:19:31PM +0200, Victor Toso wrote: > > +type EmptyCommandReturn struct { > > +CommandId string `json:"id,omitempty"` > > +Error *QapiError `json:"error,omitempty"` > > +Name

Re: [RFC PATCH v2 7/8] qapi: golang: Add CommandResult type to Go

2022-07-05 Thread Andrea Bolognani
On Fri, Jun 17, 2022 at 02:19:31PM +0200, Victor Toso wrote: > +type EmptyCommandReturn struct { > +CommandId string `json:"id,omitempty"` > +Error *QapiError `json:"error,omitempty"` > +Name string `json:"-"` > +} Do we need a specific type for this? Ca

[RFC PATCH v2 7/8] qapi: golang: Add CommandResult type to Go

2022-06-17 Thread Victor Toso
This patch adds a struct type in Go that will handle return values for QAPI's command types. The return value of a Command is, encouraged to be, QAPI's complex types or an Array of those. Every Command has a underlying CommandResult. The EmptyCommandReturn is for those that don't expect any data