Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cli: rename to create stream to create streams #229

Merged
merged 2 commits into from
Sep 25, 2023

Conversation

joe-prosser
Copy link
Contributor

As it actually creates multiple streams

@joe-prosser joe-prosser self-assigned this Sep 25, 2023
@joe-prosser joe-prosser changed the title cli: rename to cli: rename to create stream to create streams Sep 25, 2023
@joe-prosser joe-prosser force-pushed the create-stream-to-streams branch from 1951ce8 to 8328f0b Compare September 25, 2023 13:23
Copy link
Collaborator

@tommilligan tommilligan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reference, it's fairly common to have both words as a subcommand pointing to the same place.

diff --git a/cli/src/commands/create/mod.rs b/cli/src/commands/create/mod.rs
index 2c7a975..6b8ea13 100644
--- a/cli/src/commands/create/mod.rs
+++ b/cli/src/commands/create/mod.rs
@@ -67,6 +67,10 @@ pub enum CreateArgs {
     #[structopt(name = "stream")]
     /// Create a stream
     Stream(CreateStreamsArgs),
+
+    #[structopt(name = "streams")]
+    /// Create a stream
+    Streams(CreateStreamsArgs),
 }
 
 pub fn run(
@@ -90,6 +94,8 @@ pub fn run(
             stream_exception::create(&client, stream_exception_args, printer)
         }
         CreateArgs::Quota(quota_args) => quota::create(&client, quota_args),
-        CreateArgs::Stream(stream_args) => streams::create(&client, stream_args),
+        CreateArgs::Stream(stream_args) | CreateArgs::Streams(stream_args) => {
+            streams::create(&client, stream_args)
+        }
     }
 }

I would say this is better to not break back-compatibility, but up to you. I don't think the burden of supporting two variants it significant.

@joe-prosser joe-prosser merged commit 2698716 into master Sep 25, 2023
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants