(deps commandDeps)
| 19 | ) |
| 20 | |
| 21 | func newStatusCommand(deps commandDeps) *cobra.Command { |
| 22 | return &cobra.Command{ |
| 23 | Use: statusCommandKey, |
| 24 | Short: "Show consolidated runtime status", |
| 25 | Example: ` # Show runtime status |
| 26 | agh status |
| 27 | |
| 28 | # Return machine-readable status for agents |
| 29 | agh status -o json`, |
| 30 | RunE: func(cmd *cobra.Command, _ []string) error { |
| 31 | client, err := clientFromDeps(deps) |
| 32 | if err != nil { |
| 33 | return err |
| 34 | } |
| 35 | status, err := client.Status(cmd.Context()) |
| 36 | if err != nil { |
| 37 | return err |
| 38 | } |
| 39 | return writeCommandOutput(cmd, statusBundle(&status, deps.now)) |
| 40 | }, |
| 41 | } |
| 42 | } |
| 43 | |
| 44 | func newDoctorCommand(deps commandDeps) *cobra.Command { |
| 45 | var only []string |
no test coverage detected