Replace anonymous DeviceDesc field import with a named "Desc" field.

This commit is contained in:
Sebastian Zagrodzki
2017-05-06 02:47:24 +02:00
parent 4991f9c89b
commit 9f04f7bdf0
6 changed files with 15 additions and 15 deletions

4
usb.go
View File

@@ -28,7 +28,7 @@ initialized by the host stack, it's possible to retrieve it's descriptor
(the device descriptor). It contains elements such as product and vendor IDs,
bus number and device number (address) on the bus.
In gousb Device struct represents the USB device, and Device.Descriptor
In gousb Device struct represents the USB device, and Device.Desc
contains all the information known about the device.
Among other information in the device descriptor is a list of configuration
@@ -171,7 +171,7 @@ func (c *Context) ListDevices(each func(desc *DeviceDesc) bool) ([]*Device, erro
reterr = err
continue
}
ret = append(ret, &Device{handle: handle, DeviceDesc: desc})
ret = append(ret, &Device{handle: handle, Desc: desc})
} else {
libusb.dereference(dev)
}