Skip to content

fix: correct usage in server cmd#371

Merged
jason-lynch merged 1 commit intomainfrom
fix/server-usage
Apr 29, 2026
Merged

fix: correct usage in server cmd#371
jason-lynch merged 1 commit intomainfrom
fix/server-usage

Conversation

@jason-lynch
Copy link
Copy Markdown
Member

@jason-lynch jason-lynch commented Apr 29, 2026

Summary

We've renamed the control plane server binary to pgedge-control-plane. This commit fixes the usage information that you get from the server's inline help.

Testing

# this changes the 'Usage' section in the inline help to say pgedge-control-plane:
go run ./server --help

We've renamed the control plane server binary to `pgedge-control-plane`.
This commit fixes the usage information that you get from the server's
inline help, e.g.:

```sh
go run ./server --help
```
@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

📝 Walkthrough

Walkthrough

The CLI root command's usage name was updated from "control-plane" to "pgedge-control-plane" in the root command definition. No other command logic, configuration, or execution behavior was modified.

Changes

Cohort / File(s) Summary
CLI Root Command
server/cmd/root.go
Updated the root command's usage name from "control-plane" to "pgedge-control-plane".

Poem

🐰 The root command gets a shiny new name,
With "pgedge" prefix—it's not quite the same,
From simple to branded, the CLI takes flight,
A small change that makes everything right! ✨

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: correct usage in server cmd' clearly and concisely describes the main change—updating the server command's usage information from 'control-plane' to 'pgedge-control-plane'.
Description check ✅ Passed The PR description includes a summary and testing section, but is missing the Changes, Checklist, and Notes for Reviewers sections specified in the template.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/server-usage

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 0/1 reviews remaining, refill in 60 minutes.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
server/cmd/root.go (1)

46-52: Use cmd.Name() instead of cmd.Use for the version skip.

For correctness/robustness, prefer cmd.Name() == "version" (identity of the command) over cmd.Use (which is presentation/usage text and can be formatted).

Proposed change
-           if cmd.Use == "version" {
+           if cmd.Name() == "version" {
                // Skip initialization for the version command.
                return nil
            }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@server/cmd/root.go` around lines 46 - 52, In PersistentPreRunE (the function
that sets cmd.SilenceUsage), replace the version check that currently uses
cmd.Use with cmd.Name() — i.e., change the condition from if cmd.Use ==
"version" to if cmd.Name() == "version" — so the "version" command skip uses the
command identity; leave the surrounding logic (cmd.SilenceUsage = true and the
early return) unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@server/cmd/root.go`:
- Around line 46-52: In PersistentPreRunE (the function that sets
cmd.SilenceUsage), replace the version check that currently uses cmd.Use with
cmd.Name() — i.e., change the condition from if cmd.Use == "version" to if
cmd.Name() == "version" — so the "version" command skip uses the command
identity; leave the surrounding logic (cmd.SilenceUsage = true and the early
return) unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: c27e0f27-13ee-4347-a169-e5d9ae74d086

📥 Commits

Reviewing files that changed from the base of the PR and between 88d83e3 and 6d16344.

📒 Files selected for processing (1)
  • server/cmd/root.go

@jason-lynch jason-lynch merged commit 1e081a8 into main Apr 29, 2026
3 checks passed
@jason-lynch jason-lynch deleted the fix/server-usage branch April 29, 2026 19:35
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