Various input in one line
⚓ Rust 📅 2026-04-19 👤 surdeus 👁️ 3Hello
I need help with my code. The idea is to accept multiple repository names; I’ve set this up as a flag, but I want it to allow me to accept multiple names in a single run. I’m using clap.
use clap::Parser;
#[derive(Parser, Debug)]
#[doc = "This struct for creating commands"]
pub struct CommandUsername {
pub user_name_github: String,
#[arg(short, long, required = false)]
pub creation_pdf: bool,
#[arg(short, long)]
pub name_repository: Option<String>,
}
Thank you very much
2 posts - 2 participants
🏷️ Rust_feed