refactor: unify command declaration across codebase

This commit is contained in:
Jose Diaz-Gonzalez
2020-02-10 01:40:30 -05:00
parent b0abeb49dd
commit e67b96780d
108 changed files with 475 additions and 315 deletions

View File

@@ -6,10 +6,11 @@ source "$PLUGIN_AVAILABLE_PATH/domains/functions"
cmd-domains-remove-global() {
declare desc="remove global domain names via command line"
local cmd="domains:remove-global"
[[ -z $2 ]] && dokku_log_fail "Please specify a domain name. Usage: dokku $1 <domain> [<domain> ...]"
declare cmd="domains:remove-global"
[[ "$1" == "$cmd" ]] && shift 1
declare DOMAIN_NAME="$1"
shift 1
[[ -z "$DOMAIN_NAME" ]] && dokku_log_fail "Please specify a domain name. Usage: dokku $1 <domain> [<domain> ...]"
domains_remove_global "$@"
}