initial commit
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
pub mod logging;
|
||||
|
||||
use std::io::Write;
|
||||
|
||||
pub fn input(prompt: &str) -> String {
|
||||
print!("{prompt}\n > ");
|
||||
std::io::stdout().flush().expect("Failed to flush stdout");
|
||||
let mut input = String::new();
|
||||
std::io::stdin()
|
||||
.read_line(&mut input)
|
||||
.expect("Failed to read line from stdin");
|
||||
input.trim().to_string()
|
||||
}
|
||||
Reference in New Issue
Block a user