whoami
whoami copied to clipboard
Make platform-specific functions return `io::Result`, and fallback values in lib.rs
Currently, if a platform-specific function fails then it will return "Unknown", "unknown", or "localhost" depending on the function. This functionality should be moved to lib.rs where the platform-independent functions are.
If we do this, then it makes it possible to add a fallible API, ~although I'm not sure if there's any interest in such an API. Either way,~ It will improve the organization of the code and reduce duplication.
~If someone wishes to start on this, either wait for #29 to be merged, or base it off that code (to avoid merging issues).~