github_cli 0.1.0

A CLI tool for clone repository or download file from github
Documentation
#[allow(warnings)]
pub mod utils{
  use std::io::prelude::*;
  use std::io::{self, BufReader};
  use std::fs::File;
  use std::sync::{Arc, Mutex};
  use std::thread;
  use std::time::{Duration, Instant};
  pub fn print_dot_every_second(stop_flag: Arc<Mutex<bool>>) {
      let mut last_time = Instant::now();
      loop {
          let elapsed = last_time.elapsed();
          let flag = stop_flag.lock().unwrap();
          if !*flag && elapsed > Duration::from_secs(1){
              print!(".");
              io::stdout().flush().unwrap();
              last_time += Duration::from_secs(1);
          }
          thread::yield_now();
          // Check if the stop flag has been set
          if *flag {
              break;
          }
      }
  }
}