eminence / procfs

Rust library for reading the Linux procfs filesystem
Other
358 stars 105 forks source link

Improve our examples #290

Open eminence opened 9 months ago

eminence commented 9 months ago

We have several examples in the procfs/examples folder. Some of them could use additional love and attention.

For example, the partitions.rs example doesn't do anything besides print out the Debug impl.

I've love if some of these examples were enhanced to be a little more polished.

This might mean printing fields in a nice table (like interface_stats.rs or lslocks.rs), or doing something a little more involved (like lslocks.rs) that shows a semi-realworld example of how you might use these functions.

Note that there is a balancing act here -- we don't want these examples to be too complicated, because they ought to be short, readable, and primarily about one feature in particular.