diff --git a/cmd/rm.go b/cmd/rm.go index d465255..7e9baff 100644 --- a/cmd/rm.go +++ b/cmd/rm.go @@ -76,12 +76,12 @@ func rm(cmd *cobra.Command, args []string) error { return err } - return commandOutput(cmd).Render(func(w io.Writer) error { + return renderOperation(cmd, nil, removeOperationResults(results), nil, func(w io.Writer) error { if !opts.dryRun && !opts.verbose { return nil } return renderRemoveResults(w, results) - }, newJSONCommandOperationOutput(cmd, nil, removeOperationResults(results), nil)) + }) } func removeOperationResults(results []removeResult) []jsonOperationResult { diff --git a/cmd/share_link_revoke.go b/cmd/share_link_revoke.go index 772253e..cac30ee 100644 --- a/cmd/share_link_revoke.go +++ b/cmd/share_link_revoke.go @@ -177,7 +177,7 @@ func revokeSharedLinksForPath(cmd *cobra.Command, path string, dryRun bool) ([]s } func renderShareLinkRevokeOutput(cmd *cobra.Command, input shareLinkRevokeInput, results []jsonOperationResult) error { - return commandOutput(cmd).Render(func(w io.Writer) error { + return renderOperation(cmd, input, results, nil, func(w io.Writer) error { if !input.DryRun { return nil } @@ -191,7 +191,7 @@ func renderShareLinkRevokeOutput(cmd *cobra.Command, input shareLinkRevokeInput, } } return nil - }, newJSONCommandOperationOutput(cmd, input, results, nil)) + }) } var shareLinkRevokeCmd = &cobra.Command{