Re: [go PATCH] Add support for virNetworkPort object and APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




> On 19 Jun 2019, at 11:14, Daniel P. Berrangé <berrange@xxxxxxxxxx> 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.


--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list




[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux