Skip to content

Commit

Permalink
docs ~ add example code
Browse files Browse the repository at this point in the history
  • Loading branch information
rivy committed Jan 8, 2023
1 parent f4ffa07 commit 37e3991
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions examples/ex.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
use platform_info::*;

fn main() {
let uname = PlatformInfo::new().unwrap();
println!("{}", uname.sysname());
println!("{}", uname.nodename());
println!("{}", uname.release());
println!("{}", uname.version());
println!("{}", uname.machine());
println!("{}", uname.osname());
}

0 comments on commit 37e3991

Please sign in to comment.