From 9d8f9df6a03c6cc98f8be50e3d646f8415c67d98 Mon Sep 17 00:00:00 2001 From: Brian Cain Date: Mon, 4 Mar 2024 10:15:23 -0800 Subject: [PATCH] Apply suggestions from code review Co-authored-by: Evan Phoenix --- internal/commands/waypoint/actionconfig/list.go | 4 +--- internal/commands/waypoint/actionconfig/read.go | 3 +-- internal/commands/waypoint/actionconfig/update.go | 8 +++----- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/internal/commands/waypoint/actionconfig/list.go b/internal/commands/waypoint/actionconfig/list.go index d6897969..586992a8 100644 --- a/internal/commands/waypoint/actionconfig/list.go +++ b/internal/commands/waypoint/actionconfig/list.go @@ -48,7 +48,5 @@ func listActionConfig(c *cmd.Command, args []string, opts *ListOpts) error { } respPayload := resp.GetPayload() - d := format.NewDisplayer(respPayload.ActionConfigs, format.Pretty, actionConfigFields) - - return opts.Output.Display(d) + return opts.Output.Show(respPayload.ActionConfigs, format.Pretty) } diff --git a/internal/commands/waypoint/actionconfig/read.go b/internal/commands/waypoint/actionconfig/read.go index 155d8980..35f233b4 100644 --- a/internal/commands/waypoint/actionconfig/read.go +++ b/internal/commands/waypoint/actionconfig/read.go @@ -66,6 +66,5 @@ func readActionConfig(c *cmd.Command, args []string, opts *ReadOpts) error { } respPayload := resp.GetPayload() - d := format.NewDisplayer(respPayload.ActionConfig, format.Pretty, actionConfigFields) - return opts.Output.Display(d) + return opts.Output.Show(respPayload.ActionConfig, format.Pretty) } diff --git a/internal/commands/waypoint/actionconfig/update.go b/internal/commands/waypoint/actionconfig/update.go index f021d2b5..31480141 100644 --- a/internal/commands/waypoint/actionconfig/update.go +++ b/internal/commands/waypoint/actionconfig/update.go @@ -36,8 +36,8 @@ func NewCmdUpdate(ctx *cmd.Context) *cmd.Command { cmd := &cmd.Command{ Name: "update", - ShortHelp: "Update a new action configuration.", - LongHelp: "Update a new action configuration to be used to launch an action with.", + ShortHelp: "Update a action configuration.", + LongHelp: "Update a action configuration to be used to launch an action with.", RunF: func(c *cmd.Command, args []string) error { return updateActionConfig(c, args, opts) }, @@ -140,7 +140,5 @@ func updateActionConfig(c *cmd.Command, args []string, opts *UpdateOpts) error { fmt.Fprintf(opts.IO.Err(), "Action config %q updated.", opts.Name) respPayload := resp.GetPayload() - d := format.NewDisplayer(respPayload.ActionConfig, format.Pretty, actionConfigFields) - - return opts.Output.Display(d) + return opts.Output.Show(respPayload.ActionConfig, format.Pretty) }