()
| 25 | ) |
| 26 | |
| 27 | func newWorkflowContractListCmd() *cobra.Command { |
| 28 | cmd := &cobra.Command{ |
| 29 | Use: "list", |
| 30 | Aliases: []string{"ls"}, |
| 31 | Short: "List contracts", |
| 32 | RunE: func(cmd *cobra.Command, args []string) error { |
| 33 | res, err := action.NewWorkflowContractList(ActionOpts).Run() |
| 34 | if err != nil { |
| 35 | return err |
| 36 | } |
| 37 | |
| 38 | return output.EncodeOutput(flagOutputFormat, res, contractListTableOutput) |
| 39 | }, |
| 40 | } |
| 41 | |
| 42 | return cmd |
| 43 | } |
| 44 | |
| 45 | func contractItemTableOutput(contract *action.WorkflowContractItem) error { |
| 46 | return contractListTableOutput([]*action.WorkflowContractItem{contract}) |
no test coverage detected