Various input in one line

⚓ Rust    📅 2026-04-19    👤 surdeus    👁️ 3      

surdeus

Info

This post is auto-generated from RSS feed The Rust Programming Language Forum - Latest topics. Source: Various input in one line

Hello

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

Read full topic

🏷️ Rust_feed