feat: simplify flag parsing in apps plugin
Commands should be written such that they take arguments as is.
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user