//! Internal utilities.
/// Returns the name of the current platform (e.g. `"linux"`).
///
/// When the name cannot be detected, it returns `"unknown"`.
pub fn current_platform_name() -> &'static str {
if cfg!(target_os = "linux") {
"linux"
} else if cfg!(target_os = "windows") {
"windows"
} else if cfg!(target_os = "macos") {
"macos"
} else if cfg!(target_os = "ios") {
"ios"
} else if cfg!(target_os = "android") {
"android"
} else if cfg!(target_os = "freebsd") {
"freebsd"
} else if cfg!(target_os = "netbsd") {
"netbsd"
} else if cfg!(target_os = "openbsd") {
"openbsd"
} else {
"unknown"
}
}