u-root / u-bmc

Open-source firmware for your baseboard management controller (BMC)
https://u-bmc.readthedocs.io
BSD 3-Clause "New" or "Revised" License
271 stars 32 forks source link

Readability feedback #33

Open stapelberg opened 5 years ago

stapelberg commented 5 years ago

As discussed in person, here are a bunch of thoughts regarding readability improvements from a quick glance at the code:

This list might not be exhaustive, but that’s what I could find right now :)

Hope that helps!

bluecmd commented 5 years ago

Hi @stapelberg.

This is golden, thank you so much!

My plan right now is to reach a point where I have a platform with the base functionality (like, I don't know, being able to actually power on the damn thing :p) and then I'll take out the big broom and think hard and long of the structures. I'll definitely use these tips for then, and if you have more do let me know.

bluecmd commented 5 years ago

We discussed over hangouts that I should add a platform_test.go for the platform GPIO lib that catches any initialization errors with the GPIO mapping.

bluecmd commented 5 years ago

@mdlayher hinted that https://godoc.org/golang.org/x/sync/errgroup might be good to switch to as well.