grid-x / modbus

BSD 3-Clause "New" or "Revised" License
78 stars 26 forks source link

Avoid named returns #68

Closed andig closed 1 year ago

andig commented 1 year ago

Afaikt idiomatic Go tries to avoid named returns where possible. It makes the code clearer and easier to read.

This PR updates the obvious methods, though not all. The Client has the potential to shave a few ns by not assigning to results before some checks but that would lessen readability.