Skip to content

folospior/operating_system

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

operating_system

Package Version Hex Docs

Note: In a while, this package might look abandoned. I can assure you - if Gleam v2 did not drop - it works.

gleam add operating_system@1
import operating_system

pub type OS {
  Windows
  Linux
  MacOs
}

pub fn main() -> Nil {
  let os_name = operating_system.name()
  let os = case os_name {
    "windows_nt" -> Windows
    "linux" -> Linux
    "darwin" -> MacOs
    _ -> Linux
  }
}

Further documentation can be found at https://hexdocs.pm/operating_system.

About

Gleam operating system name library

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors