(cmd *cobra.Command, deps commandDeps, run func(DaemonClient) error)
| 350 | } |
| 351 | |
| 352 | func runToolCommand(cmd *cobra.Command, deps commandDeps, run func(DaemonClient) error) error { |
| 353 | client, err := clientFromDeps(deps) |
| 354 | if err != nil { |
| 355 | return err |
| 356 | } |
| 357 | err = run(client) |
| 358 | if err != nil { |
| 359 | return writeToolCommandError(cmd, err) |
| 360 | } |
| 361 | return nil |
| 362 | } |
| 363 | |
| 364 | func parseToolIDArg(raw string) (toolspkg.ToolID, error) { |
| 365 | id := toolspkg.ToolID(strings.TrimSpace(raw)) |
no test coverage detected