HostClient.ListDevices now returns an empty list instead of nil if there are no devices.

This commit is contained in:
Zach Klippenstein 2016-03-13 18:34:06 -07:00
parent c4de7097d7
commit 4e963f536d

View file

@ -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() {