desktop/
os_name.rs

1#[cfg(target_os = "linux")]
2const fn os_name() -> &'static str {
3    "Linux"
4}
5
6#[cfg(target_os = "macos")]
7const fn os_name() -> &'static str {
8    "MacOS"
9}
10
11#[cfg(target_os = "windows")]
12const fn os_name() ->  &'static str {
13    "Windows"
14}
15
16#[cfg(target_os = "ios")]
17const fn os_name() -> &'static str {
18    "IOS"
19}
20
21#[cfg(target_os = "android")]
22const fn os_name() -> &'static str {
23    "Android"
24}
25
26#[cfg(target_os = "freebsd")]
27const fn os_name() ->  &'static str {
28    "FreeBSD"
29}
30
31#[cfg(target_os = "openbsd")]
32const fn os_name() ->  &'static str {
33    "OpenBSD"
34}
35
36#[cfg(target_os = "netbsd")]
37const fn os_name() ->  &'static str {
38    "NetBSD"
39}
40
41pub fn ret_os_name() ->  &'static str {
42    os_name()
43}