(deps commandDeps)
| 288 | } |
| 289 | |
| 290 | func newToolsetsListCommand(deps commandDeps) *cobra.Command { |
| 291 | var scope toolScopeFlags |
| 292 | cmd := &cobra.Command{ |
| 293 | Use: toolOperatorListKey, |
| 294 | Short: "List registry toolsets", |
| 295 | Example: ` # List known toolsets and expansion diagnostics |
| 296 | agh toolsets list -o json`, |
| 297 | Args: cobra.NoArgs, |
| 298 | RunE: func(cmd *cobra.Command, _ []string) error { |
| 299 | return runToolCommand(cmd, deps, func(client DaemonClient) error { |
| 300 | response, err := client.ListToolsets(cmd.Context(), scope.query()) |
| 301 | if err != nil { |
| 302 | return err |
| 303 | } |
| 304 | return writeCommandOutput(cmd, toolsetListBundle(response)) |
| 305 | }) |
| 306 | }, |
| 307 | } |
| 308 | scope.bind(cmd) |
| 309 | return cmd |
| 310 | } |
| 311 | |
| 312 | func newToolsetsInfoCommand(deps commandDeps) *cobra.Command { |
| 313 | var scope toolScopeFlags |
no test coverage detected