Prechádzať zdrojové kódy

add delete apps CLI subcommand

Mohammed Nafees 4 rokov pred
rodič
commit
7bfa1a8b15
1 zmenil súbory, kde vykonal 21 pridanie a 0 odobranie
  1. 21 0
      cli/cmd/delete.go

+ 21 - 0
cli/cmd/delete.go

@@ -39,7 +39,23 @@ deleting a configuration:
 	},
 }
 
+// deleteAppsCmd represents the "porter delete apps" subcommand
+var deleteAppsCmd = &cobra.Command{
+	Use:     "apps",
+	Aliases: []string{"app"},
+	Short:   "Deletes an existing app",
+	Run: func(cmd *cobra.Command, args []string) {
+		err := checkLoginAndRun(args, deleteApp)
+
+		if err != nil {
+			os.Exit(1)
+		}
+	},
+}
+
 func init() {
+	deleteCmd.AddCommand(deleteAppsCmd)
+
 	rootCmd.AddCommand(deleteCmd)
 }
 
@@ -90,3 +106,8 @@ func delete(_ *types.GetAuthenticatedUserResponse, client *api.Client, args []st
 		gitRepoOwner, gitRepoName, gitPRNumber,
 	)
 }
+
+func deleteApp(_ *types.GetAuthenticatedUserResponse, client *api.Client, args []string) error {
+
+	return nil
+}