From 4ccb45b2d28136d18bf1eee4667c2b1b87b36454 Mon Sep 17 00:00:00 2001 From: Aaron Crawfis Date: Mon, 16 Oct 2023 22:24:49 -0700 Subject: [PATCH] Add `graph` alias for `rad app connections` (#6489) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit # Description This PR adds an alias for `rad app graph` that points to `rad app connections`. It is a temporary update until we permanently update the command. ## Type of change - This pull request fixes a bug in Radius and has an approved issue (issue link required). Partially addresses: #6473 ## Auto-generated summary ### 🤖 Generated by Copilot at b5b8f0c ### Summary :sparkles::recycle::memo: Add "graph" alias for "connections" command in `pkg/cli/cmd/app/connections/connections.go`. This enables users to view a graphical representation of the connections for an application. > _`NewCommand` adds_ > _alias for connections_ > _graph in the spring_ ### Walkthrough * Add an alias "graph" for the "connections" command ([link](https://github.com/radius-project/radius/pull/6489/files?diff=unified&w=0#diff-eb0083d8df9479acb2d5b36bf150aa410e371a26a01619d09c933a73994aa563L27-R31)) --------- Signed-off-by: Aaron Crawfis (cherry picked from commit 047da70ea2206016afcca3503cac10c9e91deec0) --- pkg/cli/cmd/app/connections/connections.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/cli/cmd/app/connections/connections.go b/pkg/cli/cmd/app/connections/connections.go index d4a64c5e5b..4676a383d4 100644 --- a/pkg/cli/cmd/app/connections/connections.go +++ b/pkg/cli/cmd/app/connections/connections.go @@ -24,10 +24,11 @@ import ( func NewCommand(factory framework.Factory) (*cobra.Command, framework.Runner) { runner := NewRunner(factory) cmd := &cobra.Command{ - Use: "connections", - Short: "Shows the connections for an application.", - Long: `Shows the connections for an application`, - Args: cobra.MaximumNArgs(1), + Use: "connections", + Aliases: []string{"graph"}, + Short: "Shows the connections for an application.", + Long: `Shows the connections for an application`, + Args: cobra.MaximumNArgs(1), Example: ` # Show connections for current application rad app connections