Skip to content

Commit 2d34eca

Browse files
dilyevskyclaude
andcommitted
[cli] add -o json/yaml to gateway routes and fix parent display format
Refactor the manually-implemented routes command to match the generic ResourceCommand pattern: add -o json/yaml output, replace duplicated stdin logic with ReadInputData, scope flag vars locally in buildRoutesCmd(), and format the PARENTS column as kind://name (e.g. gateway://my-gw) consistent with domain target display. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent bce8bf8 commit 2d34eca

File tree

3 files changed

+246
-242
lines changed

3 files changed

+246
-242
lines changed

pkg/cmd/gateway/gateway.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,6 @@ var gatewayResource = &resource.ResourceCommand[*gatewayv1.Gateway, *gatewayv1.G
154154
// Cmd returns the gateway command with the routes subcommand attached.
155155
func Cmd() *cobra.Command {
156156
cmd := gatewayResource.Build()
157-
cmd.AddCommand(routesCmd)
157+
cmd.AddCommand(buildRoutesCmd())
158158
return cmd
159159
}

0 commit comments

Comments
 (0)