refactor: standardize command naming

This standardization makes it somewhat easier to read stacktraces as the command names are all uniform, so it will be slightly easier to scan trace output.
This commit is contained in:
Jose Diaz-Gonzalez
2020-02-09 22:41:39 -05:00
parent deea791e58
commit 1cb586b2e7
134 changed files with 246 additions and 245 deletions

View File

@@ -6,7 +6,7 @@ set -eo pipefail
case "$1" in
help | domains:help)
domains_help_cmd "$@"
cmd-domains-help "$@"
;;
*)

View File

@@ -102,7 +102,7 @@ domains_help_content_func() {
help_content
}
domains_help_cmd() {
cmd-domains-help() {
if [[ $1 == "domains:help" ]]; then
echo -e 'Usage: dokku domains[:COMMAND]'
echo ''

View File

@@ -4,7 +4,7 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
domains_add_cmd() {
cmd-domains-add() {
declare desc="adds domains to app via command line"
local cmd="domains:add"
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
@@ -14,4 +14,4 @@ domains_add_cmd() {
domains_add "$@"
}
domains_add_cmd "$@"
cmd-domains-add "$@"

View File

@@ -4,7 +4,7 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
domains_add_global_cmd() {
cmd-domains-add-global() {
declare desc="add global domain names via command line"
local cmd="domains:add-global"
[[ -z $2 ]] && dokku_log_fail "Please specify a domain name. Usage: dokku $1 <domain> [<domain> ...]"
@@ -13,4 +13,4 @@ domains_add_global_cmd() {
domains_add_global "$@"
}
domains_add_global_cmd "$@"
cmd-domains-add-global "$@"

View File

@@ -4,7 +4,7 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
domains_clear_cmd() {
cmd-domains-clear() {
declare desc="clear all app domains"
local cmd="domains:clear"
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
@@ -18,4 +18,4 @@ domains_clear_cmd() {
dokku_log_info1 "Cleared domains in $APP"
}
domains_clear_cmd "$@"
cmd-domains-clear "$@"

View File

@@ -4,7 +4,7 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
domains_clear_global_cmd() {
cmd-domains-clear-global() {
declare desc="clear global domain names via command line"
local cmd="domains:clear-global"
shift 1
@@ -13,4 +13,4 @@ domains_clear_global_cmd() {
domains_clear_global "$@"
}
domains_clear_global_cmd "$@"
cmd-domains-clear-global "$@"

View File

@@ -4,7 +4,7 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
domains_main_cmd() {
cmd-domains-default() {
declare desc="print app domains"
local cmd="domains"
local APP="$2"
@@ -30,4 +30,4 @@ domains_main_cmd() {
fi
}
domains_main_cmd "$@"
cmd-domains-default "$@"

View File

@@ -4,11 +4,11 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
domains_disable_cmd() {
cmd-domains-disable() {
declare desc="disable domains/VHOST support via command line"
local cmd="domains:disable"
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
domains_disable "$2"
}
domains_disable_cmd "$@"
cmd-domains-disable "$@"

View File

@@ -4,11 +4,11 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
domains_enable_cmd() {
cmd-domains-enable() {
declare desc="enable domains/VHOST support via command line"
local cmd="domains:enable"
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
domains_enable "$2"
}
domains_enable_cmd "$@"
cmd-domains-enable "$@"

View File

@@ -4,7 +4,7 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
domains_remove_cmd() {
cmd-domains-remove() {
declare desc="removes domains from app via command line"
local cmd="domains:remove"
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
@@ -14,4 +14,4 @@ domains_remove_cmd() {
domains_remove "$@"
}
domains_remove_cmd "$@"
cmd-domains-remove "$@"

View File

@@ -4,7 +4,7 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
domains_remove_global_cmd() {
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> ...]"
@@ -13,4 +13,4 @@ domains_remove_global_cmd() {
domains_remove_global "$@"
}
domains_remove_global_cmd "$@"
cmd-domains-remove-global "$@"

View File

@@ -4,7 +4,7 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
domains_set_cmd() {
cmd-domains-set() {
declare desc="set domains for app via command line"
local cmd="domains:set"
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
@@ -14,4 +14,4 @@ domains_set_cmd() {
domains_set "$@"
}
domains_set_cmd "$@"
cmd-domains-set "$@"

View File

@@ -4,7 +4,7 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
domains_set_global_cmd() {
cmd-domains-set-global() {
declare desc="set global domain names via command line"
local cmd="domains:set-global"
[[ -z $2 ]] && dokku_log_fail "Please specify a domain name. Usage: dokku $1 <domain> [<domain> ...]"
@@ -13,4 +13,4 @@ domains_set_global_cmd() {
domains_set_global "$@"
}
domains_set_global_cmd "$@"
cmd-domains-set-global "$@"

View File

@@ -4,11 +4,11 @@ set -eo pipefail
source "$PLUGIN_CORE_AVAILABLE_PATH/common/functions"
source "$PLUGIN_AVAILABLE_PATH/domains/functions"
domains_setup_cmd() {
cmd-domains-setup() {
declare desc="setup domains to default state via command line"
local cmd="domains:setup"
[[ -z $2 ]] && dokku_log_fail "Please specify an app to run the command on"
domains_setup "$2"
}
domains_setup_cmd "$@"
cmd-domains-setup "$@"