File tree Expand file tree Collapse file tree 4 files changed +7
-2
lines changed
Expand file tree Collapse file tree 4 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ const formatTable = "table"
3232// Supported list of tabulated data that can be rendered as a table
3333type tabulatedData interface {
3434 []* action.WorkflowItem |
35+ * action.WorkflowItem |
3536 * action.AttestationStatusResult |
3637 []* action.WorkflowRunItem |
3738 * action.WorkflowRunItemFull |
Original file line number Diff line number Diff line change @@ -67,7 +67,7 @@ func newWorkflowCreateCmd() *cobra.Command {
6767 }
6868
6969 // Print the workflow table
70- if err := encodeOutput ([] * action. WorkflowItem { wf }, WorkflowListTableOutput ); err != nil {
70+ if err := encodeOutput (wf , workflowItemTableOutput ); err != nil {
7171 return fmt .Errorf ("failed to print workflow: %w" , err )
7272 }
7373
Original file line number Diff line number Diff line change @@ -32,7 +32,7 @@ func newWorkflowDescribeCmd() *cobra.Command {
3232 return err
3333 }
3434
35- return encodeOutput ([] * action. WorkflowItem { wf }, WorkflowListTableOutput )
35+ return encodeOutput (wf , workflowItemTableOutput )
3636 },
3737 }
3838
Original file line number Diff line number Diff line change @@ -44,6 +44,10 @@ func newWorkflowListCmd() *cobra.Command {
4444 return cmd
4545}
4646
47+ func workflowItemTableOutput (workflow * action.WorkflowItem ) error {
48+ return WorkflowListTableOutput ([]* action.WorkflowItem {workflow })
49+ }
50+
4751func WorkflowListTableOutput (workflows []* action.WorkflowItem ) error {
4852 if len (workflows ) == 0 {
4953 fmt .Println ("there are no workflows yet" )
You can’t perform that action at this time.
0 commit comments