diff --git a/serial.go b/serial.go index 0b403da..6c933a0 100644 --- a/serial.go +++ b/serial.go @@ -39,13 +39,13 @@ type SerialPortError struct { } const ( - ERROR_PORT_BUSY = 1 - ERROR_PORT_NOT_FOUND = 2 - ERROR_INVALID_SERIAL_PORT = 3 - ERROR_PERMISSION_DENIED = 4 - ERROR_INVALID_PORT_SPEED = 5 - ERROR_ENUMERATING_PORTS = 6 - ERROR_OTHER = 99 + ERROR_PORT_BUSY = iota + ERROR_PORT_NOT_FOUND + ERROR_INVALID_SERIAL_PORT + ERROR_PERMISSION_DENIED + ERROR_INVALID_PORT_SPEED + ERROR_ENUMERATING_PORTS + ERROR_OTHER ) func (e SerialPortError) Error() string {