bugst / go-serial

A cross-platform serial library for go-lang.
BSD 3-Clause "New" or "Revised" License
620 stars 189 forks source link

Fixing getPortList on windows without any ports #59

Closed martinzak-zaber closed 4 years ago

martinzak-zaber commented 5 years ago

Hello,

Thank you for creating this awesome library! We have found a problem where on machine without serial ports the library returns error ErrorEnumeratingPorts. We found it in VirtualBox machine. Issue occurs because the registry key HARDWARE\DEVICEMAP\SERIALCOMM\ does not even exist. It seems a valid case to us and we think it should return empty slice instead of an error.

Please feel free to comment if the code is not up to your standards we would fix it.

Thank you.

cmaglie commented 4 years ago

Thank you!