atharvalade commented on code in PR #2998:
URL: https://github.com/apache/iggy/pull/2998#discussion_r2996288391


##########
core/cli/src/args/context.rs:
##########
@@ -50,3 +75,134 @@ pub(crate) struct ContextUseArgs {
     #[arg(value_parser = clap::value_parser!(String))]
     pub(crate) context_name: String,
 }
+
+#[derive(Debug, Clone, Args)]
+pub(crate) struct ContextCreateArgs {
+    /// Name of the context to create
+    #[arg(value_parser = clap::value_parser!(String))]
+    pub(crate) context_name: String,
+
+    /// The transport to use
+    ///
+    /// Valid values are "quic", "http", "tcp" and "ws".
+    #[clap(verbatim_doc_comment, long)]
+    pub(crate) transport: Option<String>,

Review Comment:
   added `validate_transport` in `create_context.rs` that calls 
`TransportProtocol::from_str `before writing, so invalid values like 
--transport foobar now fail immediately with a clear message listing valid 
options.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to