rgbkrk / libvirt-go

[DEPRECATED] Go bindings for libvirt
https://github.com/libvirt/libvirt-go
MIT License
166 stars 50 forks source link

uint vs uint16 for vcpus? #117

Open purpleidea opened 7 years ago

purpleidea commented 7 years ago

How come the setter and getter for CPU's isn't the same type?

Eg:

func (d *VirDomain) SetVcpus(vcpu uint) error

vs.

func (i *VirDomainInfo) GetNrVirtCpu() uint16

Or did I miss something? If not, LMK what we prefer, I'm happy to write the patch.

vincentbernat commented 7 years ago

Switching uint16 to uint seems a good move for me.

purpleidea commented 7 years ago

I've added a patch for this: https://github.com/rgbkrk/libvirt-go/pull/121