(deps commandDeps)
| 510 | } |
| 511 | |
| 512 | func newMemoryHealthCommand(deps commandDeps) *cobra.Command { |
| 513 | return &cobra.Command{ |
| 514 | Use: memoryHealthKey, |
| 515 | Short: "Show Memory v2 health", |
| 516 | Args: cobra.NoArgs, |
| 517 | RunE: func(cmd *cobra.Command, _ []string) error { |
| 518 | client, err := clientFromDeps(deps) |
| 519 | if err != nil { |
| 520 | return err |
| 521 | } |
| 522 | workspace, err := currentWorkingDirectory(deps) |
| 523 | if err != nil { |
| 524 | return err |
| 525 | } |
| 526 | health, err := client.MemoryHealth(cmd.Context(), workspace) |
| 527 | if err != nil { |
| 528 | return err |
| 529 | } |
| 530 | return writeCommandOutput(cmd, memoryHealthBundle(health)) |
| 531 | }, |
| 532 | } |
| 533 | } |
| 534 | |
| 535 | func newMemoryPromoteCommand(deps commandDeps) *cobra.Command { |
| 536 | var flags memorySelectorFlags |
no test coverage detected