HostClient.ListDevices now returns an empty list instead of nil if there are no devices.
This commit is contained in:
parent
c4de7097d7
commit
4e963f536d
|
@ -40,7 +40,7 @@ func newDevice(serial string, attrs map[string]string) (*DeviceInfo, error) {
|
|||
}
|
||||
|
||||
func parseDeviceList(list string, lineParseFunc func(string) (*DeviceInfo, error)) ([]*DeviceInfo, error) {
|
||||
var devices []*DeviceInfo
|
||||
devices := []*DeviceInfo{}
|
||||
scanner := bufio.NewScanner(strings.NewReader(list))
|
||||
|
||||
for scanner.Scan() {
|
||||
|
|
Loading…
Reference in a new issue