[libvirt] [go PATCH] Add support for virNetworkPort object and APIs
Christophe de Dinechin
cdupontd at redhat.com
Wed Jun 19 10:49:08 UTC 2019
> On 19 Jun 2019, at 11:14, Daniel P. Berrangé <berrange at redhat.com> wrote:
>
> On Wed, Jun 19, 2019 at 10:50:14AM +0200, Christophe de Dinechin wrote:
>
> So the first thing our Go code does is check the libvirt native library
> version number and report an error
>
> eg
>
> func (n *NetworkPort) Delete(flags uint) error {
> if C.LIBVIR_VERSION_NUMBER < 5005000 {
> return makeNotImplementedError("virNetworkPortDelete")
> }
Duh, of course, that’s supposed to be the only consumer!
I somehow imagined that the wrappers themselves were exposed,
i.e. some Go programmer could have some weird reason to write
C.virtFunc(blah)
I don’t think you can prevent it, but I agree that with proper Go wrappers, there
is no reason this would ever happen…
FWIW, the code looks sane to me, but I don’t consider myself enough of an
expert in this area to report a Reviewed-by.
More information about the libvir-list
mailing list