use serde::{Deserialize, Serialize};
pub mod data;
#[derive(Serialize, Deserialize, Debug)]
pub enum OS {
WINDOWS, MACOS, LINUX, OTHER
}
impl OS {
pub fn get() -> Self {
let os = std::env::consts::OS;
match os {
"windows" => OS::WINDOWS,
"macos" => OS::MACOS,
"linux" => OS::LINUX,
_ => OS::OTHER,
}
}
pub fn is_unix(&self) -> bool {
matches!(self, OS::MACOS | OS::LINUX)
}
}