(deps commandDeps)
| 91 | } |
| 92 | |
| 93 | func newBridgeListCommand(deps commandDeps) *cobra.Command { |
| 94 | return &cobra.Command{ |
| 95 | Use: bridgeListKey, |
| 96 | Short: "List bridge instances", |
| 97 | RunE: func(cmd *cobra.Command, _ []string) error { |
| 98 | client, err := clientFromDeps(deps) |
| 99 | if err != nil { |
| 100 | return err |
| 101 | } |
| 102 | |
| 103 | items, err := client.ListBridges(cmd.Context()) |
| 104 | if err != nil { |
| 105 | return err |
| 106 | } |
| 107 | return writeCommandOutput(cmd, bridgeListBundle(items, deps.now)) |
| 108 | }, |
| 109 | } |
| 110 | } |
| 111 | |
| 112 | func newBridgeGetCommand(deps commandDeps) *cobra.Command { |
| 113 | return &cobra.Command{ |
no test coverage detected