Skip to content

Commit

Permalink
cargo init
Browse files Browse the repository at this point in the history
  • Loading branch information
9bany committed Oct 27, 2023
1 parent 5dff5af commit 9e6ae5a
Show file tree
Hide file tree
Showing 4 changed files with 259 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,8 @@
__pycache__
system/.custom
system/.exports


# Added by cargo

/target
223 changes: 223 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 9 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "dot_files"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
clap = { version = "4.4.7", features = ["derive"] }
22 changes: 22 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
use clap::Parser;

/// Simple program to greet a person
#[derive(Parser, Debug)]
#[command(author, version, about, long_about = None)]
struct Args {
/// Name of the person to greet
#[arg(short, long)]
name: String,

/// Number of times to greet
#[arg(short, long, default_value_t = 1)]
count: u8,
}

fn main() {
let args = Args::parse();

for _ in 0..args.count {
println!("Hello {}!", args.name)
}
}

0 comments on commit 9e6ae5a

Please sign in to comment.