mod cgit_helper; mod git_tools; mod pgp_tools; mod read_config; #[cfg(test)] mod test; use core::panic; use git_tools::make_repo; use read_config::{get_config, Config}; use serde::Deserialize; #[derive(Debug, Deserialize)] struct MakeRepoRequest { repo_name: String, author: String, section: String, description: String, } fn make_repo_request_handler(config: Config, req: MakeRepoRequest) { println!("Hello, world!"); let _repository = match make_repo( &req.repo_name, &req.author, &req.section, &req.description, config, ) { Ok(repo) => repo, Err(_e) => panic!("Something went wrong during repo init"), }; } fn main() { let config: Config = get_config("./config.local.json".to_string()); make_repo_request_handler(config, MakeRepoRequest { repo_name: "hello-world".to_string(), author: "joe mama".to_string(), section: "skibidi".to_string(), description: "foo bar".to_string(), }); }