MCPcopy Create free account
hub / github.com/GetStream/stream-cli / removeAppCmd

Function removeAppCmd

pkg/cmd/config/config.go:49–74  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47}
48
49func removeAppCmd() *cobra.Command {
50 return &cobra.Command{
51 Use: "remove [app-name-1] [app-name-2] [app-name-n]",
52 Short: "Remove one or more application.",
53 Long: "Remove one or more application from the configuration file. This operation is irrevocable.",
54 Example: heredoc.Doc(`
55 # Remove a single application from the CLI
56 $ stream-cli config remove staging
57
58 # Remove multiple applications from the CLI
59 $ stream-cli config remove staging testing
60 `),
61 Args: cobra.MinimumNArgs(1),
62 RunE: func(cmd *cobra.Command, args []string) error {
63 config := cfg.GetConfig(cmd)
64 for _, appName := range args {
65 if err := config.Remove(appName); err != nil {
66 return err
67 }
68 cmd.Printf("[%s] application successfully removed.\n", appName)
69 }
70
71 return nil
72 },
73 }
74}
75
76func listAppsCmd() *cobra.Command {
77 return &cobra.Command{

Callers 1

NewRootCmdFunction · 0.85

Calls 1

RemoveMethod · 0.80

Tested by

no test coverage detected