Skip to content

Commit

Permalink
add usage parameters (#2125)
Browse files Browse the repository at this point in the history
* add usage parameters

* delete prints

* replace positional arguments placeholders

---------

Co-authored-by: Raúl Barroso <ra.barroso@gmail.com>
  • Loading branch information
maha-hajja and raulb authored Feb 5, 2025
1 parent 432528b commit de1579d
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions cmd/conduit/root/connectorplugins/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c *DescribeCommand) Output(output ecdysis.Output) {
c.output = output
}

func (c *DescribeCommand) Usage() string { return "describe" }
func (c *DescribeCommand) Usage() string { return "describe CONNECTOR_PLUGIN_ID" }

func (c *DescribeCommand) Docs() ecdysis.Docs {
return ecdysis.Docs{
Expand Down Expand Up @@ -80,7 +80,7 @@ func (c *DescribeCommand) ExecuteWithClient(ctx context.Context, client *api.Cli
Name: c.args.connectorPluginID,
})
if err != nil {
return cerrors.Errorf("failed to list connector plguin: %w", err)
return cerrors.Errorf("failed to list connector plugin: %w", err)
}

if len(resp.Plugins) == 0 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/conduit/root/connectors/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c *DescribeCommand) Output(output ecdysis.Output) {
c.output = output
}

func (c *DescribeCommand) Usage() string { return "describe" }
func (c *DescribeCommand) Usage() string { return "describe CONNECTOR_ID" }

func (c *DescribeCommand) Docs() ecdysis.Docs {
return ecdysis.Docs{
Expand Down
2 changes: 1 addition & 1 deletion cmd/conduit/root/pipelines/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ func (c *DescribeCommand) Output(output ecdysis.Output) {

func (c *DescribeCommand) Aliases() []string { return []string{"desc"} }

func (c *DescribeCommand) Usage() string { return "describe" }
func (c *DescribeCommand) Usage() string { return "describe PIPELINE_ID" }

func (c *DescribeCommand) Args(args []string) error {
if len(args) == 0 {
Expand Down
4 changes: 3 additions & 1 deletion cmd/conduit/root/pipelines/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ func (c *InitCommand) Flags() []ecdysis.Flag {
}

flags.SetDefault("pipelines.path", filepath.Join(currentPath, "./pipelines"))
flags.SetDefault("source", "generator")
flags.SetDefault("destination", "file")
return flags
}

Expand All @@ -85,7 +87,7 @@ func (c *InitCommand) Args(args []string) error {
return nil
}

func (c *InitCommand) Usage() string { return "init" }
func (c *InitCommand) Usage() string { return "init PIPELINE_NAME" }

func (c *InitCommand) Docs() ecdysis.Docs {
return ecdysis.Docs{
Expand Down
2 changes: 1 addition & 1 deletion cmd/conduit/root/processorplugins/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c *DescribeCommand) Output(output ecdysis.Output) {
c.output = output
}

func (c *DescribeCommand) Usage() string { return "describe" }
func (c *DescribeCommand) Usage() string { return "describe PROCESSOR_PLUGIN_ID" }

func (c *DescribeCommand) Docs() ecdysis.Docs {
return ecdysis.Docs{
Expand Down
2 changes: 1 addition & 1 deletion cmd/conduit/root/processors/describe.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func (c *DescribeCommand) Output(output ecdysis.Output) {
c.output = output
}

func (c *DescribeCommand) Usage() string { return "describe" }
func (c *DescribeCommand) Usage() string { return "describe PROCESSOR_ID" }

func (c *DescribeCommand) Docs() ecdysis.Docs {
return ecdysis.Docs{
Expand Down

0 comments on commit de1579d

Please sign in to comment.