use std::io::{self, Write};

pub fn read_from_input(message: &str) -> Result<String, anyhow::Error> {
    let mut result_string = String::new();
    print!("{}: ", message);
    io::stdout().flush()?;

    io::stdin().read_line(&mut result_string)?;
    let result_string = result_string.trim();
    Ok(result_string.to_string())
}
