intial commit
This commit is contained in:
29
src/main.rs
Normal file
29
src/main.rs
Normal file
@@ -0,0 +1,29 @@
|
||||
#![feature(seek_stream_len)]
|
||||
|
||||
use std::fs::File;
|
||||
|
||||
use clap::Parser;
|
||||
|
||||
use crate::ext::FileExt;
|
||||
|
||||
pub mod args;
|
||||
pub mod auth;
|
||||
pub mod conf;
|
||||
pub mod ext;
|
||||
|
||||
#[tokio::main]
|
||||
async fn main() -> anyhow::Result<()> {
|
||||
let args = args::Args::parse();
|
||||
let conf = if let Some(conf) = File::try_open(&args.conf) {
|
||||
conf::Config::from_toml_file(&mut conf?)?
|
||||
} else {
|
||||
conf::Config::default()
|
||||
};
|
||||
|
||||
println!("{conf:#?}");
|
||||
|
||||
let res = auth::authenticate(&args, "javalsai", "test").await;
|
||||
println!("{res:?}");
|
||||
|
||||
Ok(())
|
||||
}
|
||||
Reference in New Issue
Block a user