feat: simplify flag parsing in apps plugin

Commands should be written such that they take arguments as is.
This commit is contained in:
Jose Diaz-Gonzalez
2020-05-09 00:44:20 -04:00
parent 6a8783e357
commit ce154aff09
6 changed files with 110 additions and 114 deletions

View File

@@ -86,26 +86,6 @@ func destroyApp(appName string) error {
return nil
}
func getAppName(args []string) (appName string, err error) {
if len(args) >= 1 {
appName = args[0]
} else {
err = errors.New("Please specify an app to run the command on")
}
return
}
func getNewAppName(args []string) (appName string, err error) {
if len(args) >= 2 {
appName = args[1]
} else {
err = errors.New("Please specify an new app name")
}
return
}
func listImagesByAppLabel(appName string) ([]string, error) {
command := []string{
common.DockerBin(),