jaypipes / ghw

Go HardWare discovery/inspection library
Apache License 2.0
1.62k stars 174 forks source link

doc and const cleanup for cpu, block, memory, and net packages #352

Closed jaypipes closed 1 year ago

jaypipes commented 1 year ago

doc and const cleanup for net package

Ensures proper docstrings for all exported things in the `net`
package and deprecates the (non-Go-idiomatic) ALL_CAPS constants in
favour of CamelCase constants.

doc and const cleanup for block package

Ensures proper docstrings for all exported things in the `block`
package and deprecates the (non-Go-idiomatic) ALL_CAPS constants in
favour of CamelCase constants.

Also officially deprecates the `pkg/block.Info.TotalPhysicalBytes` field
in favour of a `pkg/block.Info.TotalSizeBytes` field (had a TODO in
there a while to do this...).

ensure ProcessorCore.LogicalProcessors sorted

Ensures that we sort the `ProcessorCore.LogicalProcessors` slice of ints
for each processor core in Linux.

Also update the documentation for the CPU package to mark the
`Processor.Cores` and `Processor.Capabilities` fields as Linux-only.

doc and const cleanup for memory package

Ensures proper docstrings for all exported things in the `memory`
package and deprecates the (non-Go-idiomatic) ALL_CAPS constants in
favour of CamelCase constants.
jaypipes commented 1 year ago

@ffromani mostly docstring updates in here. sorry for the large PR. Feel free to review each commit separately if that's easier for you.

jaypipes commented 1 year ago

@ffromani heya :) any chance to do a quick review on this one today?

ffromani commented 1 year ago

@ffromani heya :) any chance to do a quick review on this one today?

yes, sorry. I'll squeeze in my day today