first commit
This commit is contained in:
commit
be1efce6e8
5 changed files with 42 additions and 0 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
/target
|
||||
7
Cargo.lock
generated
Normal file
7
Cargo.lock
generated
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
# This file is automatically @generated by Cargo.
|
||||
# It is not intended for manual editing.
|
||||
version = 4
|
||||
|
||||
[[package]]
|
||||
name = "m-grep"
|
||||
version = "0.1.0"
|
||||
6
Cargo.toml
Normal file
6
Cargo.toml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
[package]
|
||||
name = "m-grep"
|
||||
version = "0.1.0"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
23
src/lib.rs
Normal file
23
src/lib.rs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
|
||||
pub struct Config {
|
||||
search_text: String,
|
||||
file_path: String,
|
||||
ignor_case: bool,
|
||||
}
|
||||
|
||||
impl Config {
|
||||
pub fn build(mut args: Vec<String>) -> () {
|
||||
args.remove(0); // Remove program path
|
||||
|
||||
println!("{:?}", args);
|
||||
// Self {
|
||||
|
||||
// }
|
||||
()
|
||||
}
|
||||
|
||||
fn is_ignore_case(args: Vec<String>) {
|
||||
|
||||
}
|
||||
}
|
||||
5
src/main.rs
Normal file
5
src/main.rs
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
|
||||
fn main() {
|
||||
let args: Vec<String> = std::env::args().collect();
|
||||
m_grep::Config::build(args);
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue