File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
internal/cli/opsmanager/agents Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 1414package agents
1515
1616import (
17+ "fmt"
1718 "strings"
1819
1920 "github.com/mongodb/mongocli/internal/cli"
@@ -53,12 +54,13 @@ func (opts *ListOpts) Run() error {
5354
5455// mongocli om agent(s) list [--projectId projectId].
5556func ListBuilder () * cobra.Command {
57+ validArgs := []string {"AUTOMATION" , "MONITORING" , "BACKUP" }
5658 opts := & ListOpts {}
5759 cmd := & cobra.Command {
58- Use : "list" ,
60+ Use : fmt . Sprintf ( "list <%s>" , strings . Join ( validArgs , "|" )) ,
5961 Aliases : []string {"ls" },
6062 Args : require .ExactValidArgs (1 ),
61- ValidArgs : [] string { "AUTOMATION" , "MONITORING" , "BACKUP" } ,
63+ ValidArgs : validArgs ,
6264 Short : "List available MongoDB Agents for your project." ,
6365 PreRunE : func (cmd * cobra.Command , args []string ) error {
6466 return opts .PreRunE (
You can’t perform that action at this time.
0 commit comments