From: Nicholas Rosbrook <rosbrookn@ainfosec.com>
To: George Dunlap <george.dunlap@citrix.com>,
"xen-devel@lists.xenproject.org" <xen-devel@lists.xenproject.org>
Cc: "anthony.perard@citrix.com" <anthony.perard@citrix.com>,
Brendan Kerrigan <kerriganb@ainfosec.com>,
"ian.jackson@eu.citrix.com" <ian.jackson@eu.citrix.com>,
Nicolas Belouin <nicolas.belouin@gandi.net>,
"wl@xen.org" <wl@xen.org>
Subject: Re: [Xen-devel] [RFC] Generating Go bindings for libxl
Date: Wed, 4 Sep 2019 18:23:51 +0000 [thread overview]
Message-ID: <229bd9fef40d42689c3ca60def2d435b@ainfosec.com> (raw)
In-Reply-To: <dbeeb071-25ae-9652-4be1-e3067109179f@citrix.com>
> Unfortunately this would mean the type assertion would be pretty long as
> well:
> hvm := di.TypeUnion.(xenlight.DomainBuildInfoTypeUnionHvm)
> hvm.[element]
Made worse by the fact that you really should check the type assertion first:
hvm, ok := di.TypeUnion.(xenlight.DomainBuildInfoTypeUnionHvm)
if !ok {
//error
}
> But unfortunately I don't think there's a way around that; that's just a
> limitation of Go.
Right. If we wanted to make it easier on the users of the package, we *could*
add getters that hides the type assertion. But, that's still an extra step versus C.
-NR
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2019-09-04 18:24 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-07-30 13:11 [Xen-devel] [RFC] Generating Go bindings for libxl Nicholas Rosbrook
2019-07-30 13:48 ` Tamas K Lengyel
2019-07-30 15:49 ` George Dunlap
2019-07-30 18:39 ` Tamas K Lengyel
2019-07-31 15:14 ` George Dunlap
2019-07-30 15:22 ` George Dunlap
2019-07-30 21:52 ` Nicholas Rosbrook
2019-07-31 15:06 ` George Dunlap
2019-07-31 21:22 ` Nicholas Rosbrook
2019-08-01 18:59 ` Nicholas Rosbrook
2019-08-02 15:38 ` George Dunlap
2019-08-02 19:09 ` Nicholas Rosbrook
2019-09-04 0:36 ` Nicholas Rosbrook
2019-09-04 16:52 ` George Dunlap
2019-09-04 16:59 ` George Dunlap
2019-09-04 18:23 ` Nicholas Rosbrook [this message]
2019-09-11 20:25 ` Nicholas Rosbrook
2019-09-12 14:37 ` George Dunlap
2019-09-12 17:35 ` Nicholas Rosbrook
2019-09-13 11:21 ` George Dunlap
2019-09-13 13:28 ` Nicholas Rosbrook
2019-09-24 0:33 ` Nicholas Rosbrook
2019-09-30 14:51 ` George Dunlap
2019-09-30 18:08 ` Nicholas Rosbrook
2019-09-04 18:15 ` Nicholas Rosbrook
2019-08-02 15:55 ` George Dunlap
2019-07-30 16:27 ` George Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=229bd9fef40d42689c3ca60def2d435b@ainfosec.com \
--to=rosbrookn@ainfosec.com \
--cc=anthony.perard@citrix.com \
--cc=george.dunlap@citrix.com \
--cc=ian.jackson@eu.citrix.com \
--cc=kerriganb@ainfosec.com \
--cc=nicolas.belouin@gandi.net \
--cc=wl@xen.org \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).