repo/repo.rs
1use gh_cli_rs::GhClient;
2
3fn main() -> Result<(), Box<dyn std::error::Error>> {
4 let client = GhClient::new();
5 println!("Creating a new repository:");
6 match client
7 .repo()
8 .create("gh-cli-rs")
9 .description("A wrapper for GitHub CLI in Rust")
10 .public()
11 .with_readme()
12 .execute()
13 {
14 Ok(result) => println!("✓ Repository created: {}", result),
15 Err(e) => eprintln!("✗ Error: {}", e),
16 }
17
18 Ok(())
19}