From d32e8c6e98e6679f2c902fcdd26664c23136f715 Mon Sep 17 00:00:00 2001 From: Philip Laine Date: Tue, 13 Oct 2020 12:21:45 +0200 Subject: [PATCH] Remove aliases --- cmd/gotk/create_alert.go | 7 +++---- cmd/gotk/create_alertprovider.go | 11 +++++------ cmd/gotk/create_receiver.go | 9 ++++----- cmd/gotk/delete_alert.go | 7 +++---- cmd/gotk/delete_alertprovider.go | 9 ++++----- cmd/gotk/delete_receiver.go | 7 +++---- cmd/gotk/export_alert.go | 7 +++---- cmd/gotk/export_alertprovider.go | 11 +++++------ cmd/gotk/export_receiver.go | 11 +++++------ cmd/gotk/get_alert.go | 7 +++---- cmd/gotk/get_alertprovider.go | 7 +++---- cmd/gotk/get_receiver.go | 7 +++---- cmd/gotk/resume_alert.go | 5 ++--- cmd/gotk/resume_receiver.go | 7 +++---- cmd/gotk/suspend_alert.go | 7 +++---- cmd/gotk/suspend_receiver.go | 7 +++---- docs/cmd/gotk_create_alert-provider.md | 4 ++-- docs/cmd/gotk_create_receiver.md | 2 +- docs/cmd/gotk_delete_alert-provider.md | 2 +- docs/cmd/gotk_export_alert-provider.md | 4 ++-- docs/cmd/gotk_export_receiver.md | 4 ++-- docs/cmd/gotk_resume_receiver.md | 2 +- 22 files changed, 64 insertions(+), 80 deletions(-) diff --git a/cmd/gotk/create_alert.go b/cmd/gotk/create_alert.go index ca0d8f56..6e7cbd53 100644 --- a/cmd/gotk/create_alert.go +++ b/cmd/gotk/create_alert.go @@ -33,10 +33,9 @@ import ( ) var createAlertCmd = &cobra.Command{ - Use: "alert [name]", - Aliases: []string{}, - Short: "Create or update a Alert resource", - Long: "The create alert command generates a Alert resource.", + Use: "alert [name]", + Short: "Create or update a Alert resource", + Long: "The create alert command generates a Alert resource.", Example: ` # Create an Alert for kustomization events gotk create alert \ --event-severity info \ diff --git a/cmd/gotk/create_alertprovider.go b/cmd/gotk/create_alertprovider.go index 64098f43..8df247e9 100644 --- a/cmd/gotk/create_alertprovider.go +++ b/cmd/gotk/create_alertprovider.go @@ -33,19 +33,18 @@ import ( ) var createAlertProviderCmd = &cobra.Command{ - Use: "alert-provider [name]", - Aliases: []string{"ap"}, - Short: "Create or update a Provider resource", - Long: "The create alert-provider command generates a Provider resource.", + Use: "alert-provider [name]", + Short: "Create or update a Provider resource", + Long: "The create alert-provider command generates a Provider resource.", Example: ` # Create a Provider for a Slack channel - gotk create ap slack \ + gotk create alert-provider slack \ --type slack \ --channel general \ --address https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \ --secret-ref webhook-url # Create a Provider for a Github repository - gotk create ap github-podinfo \ + gotk create alert-provider github-podinfo \ --type github \ --address https://github.com/stefanprodan/podinfo \ --secret-ref github-token diff --git a/cmd/gotk/create_receiver.go b/cmd/gotk/create_receiver.go index 9d8ddda4..367cd6a5 100644 --- a/cmd/gotk/create_receiver.go +++ b/cmd/gotk/create_receiver.go @@ -33,12 +33,11 @@ import ( ) var createReceiverCmd = &cobra.Command{ - Use: "receiver [name]", - Aliases: []string{"rcv"}, - Short: "Create or update a Receiver resource", - Long: "The create receiver command generates a Receiver resource.", + Use: "receiver [name]", + Short: "Create or update a Receiver resource", + Long: "The create receiver command generates a Receiver resource.", Example: ` # Create a Receiver - gotk create rcv github-receiver \ + gotk create receiver github-receiver \ --type github \ --event ping \ --event push \ diff --git a/cmd/gotk/delete_alert.go b/cmd/gotk/delete_alert.go index 42390607..b918f2b7 100644 --- a/cmd/gotk/delete_alert.go +++ b/cmd/gotk/delete_alert.go @@ -28,10 +28,9 @@ import ( ) var deleteAlertCmd = &cobra.Command{ - Use: "alert [name]", - Aliases: []string{}, - Short: "Delete a Alert resource", - Long: "The delete alert command removes the given Alert from the cluster.", + Use: "alert [name]", + Short: "Delete a Alert resource", + Long: "The delete alert command removes the given Alert from the cluster.", Example: ` # Delete an Alert and the Kubernetes resources created by it gotk delete alert main `, diff --git a/cmd/gotk/delete_alertprovider.go b/cmd/gotk/delete_alertprovider.go index d4eceeef..1b641529 100644 --- a/cmd/gotk/delete_alertprovider.go +++ b/cmd/gotk/delete_alertprovider.go @@ -28,12 +28,11 @@ import ( ) var deleteAlertProviderCmd = &cobra.Command{ - Use: "alert-provider [name]", - Aliases: []string{"ap"}, - Short: "Delete a Provider resource", - Long: "The delete alert-provider command removes the given Provider from the cluster.", + Use: "alert-provider [name]", + Short: "Delete a Provider resource", + Long: "The delete alert-provider command removes the given Provider from the cluster.", Example: ` # Delete a Provider and the Kubernetes resources created by it - gotk delete ap slack + gotk delete alert-provider slack `, RunE: deleteAlertProviderCmdRun, } diff --git a/cmd/gotk/delete_receiver.go b/cmd/gotk/delete_receiver.go index 63ba151a..253308e0 100644 --- a/cmd/gotk/delete_receiver.go +++ b/cmd/gotk/delete_receiver.go @@ -28,10 +28,9 @@ import ( ) var deleteReceiverCmd = &cobra.Command{ - Use: "receiver [name]", - Aliases: []string{"rcv"}, - Short: "Delete a Receiver resource", - Long: "The delete receiver command removes the given Receiver from the cluster.", + Use: "receiver [name]", + Short: "Delete a Receiver resource", + Long: "The delete receiver command removes the given Receiver from the cluster.", Example: ` # Delete an Receiver and the Kubernetes resources created by it gotk delete receiver main `, diff --git a/cmd/gotk/export_alert.go b/cmd/gotk/export_alert.go index 9e5ea0c6..e5a69f07 100644 --- a/cmd/gotk/export_alert.go +++ b/cmd/gotk/export_alert.go @@ -30,10 +30,9 @@ import ( ) var exportAlertCmd = &cobra.Command{ - Use: "alert [name]", - Aliases: []string{}, - Short: "Export Alert resources in YAML format", - Long: "The export alert command exports one or all Alert resources in YAML format.", + Use: "alert [name]", + Short: "Export Alert resources in YAML format", + Long: "The export alert command exports one or all Alert resources in YAML format.", Example: ` # Export all Alert resources gotk export alert --all > alerts.yaml diff --git a/cmd/gotk/export_alertprovider.go b/cmd/gotk/export_alertprovider.go index 1d74d3a0..88a61182 100644 --- a/cmd/gotk/export_alertprovider.go +++ b/cmd/gotk/export_alertprovider.go @@ -30,15 +30,14 @@ import ( ) var exportAlertProviderCmd = &cobra.Command{ - Use: "alert-provider [name]", - Aliases: []string{"ap"}, - Short: "Export Provider resources in YAML format", - Long: "The export alert-provider command exports one or all Provider resources in YAML format.", + Use: "alert-provider [name]", + Short: "Export Provider resources in YAML format", + Long: "The export alert-provider command exports one or all Provider resources in YAML format.", Example: ` # Export all Provider resources - gotk export ap --all > alert-providers.yaml + gotk export alert-provider --all > alert-providers.yaml # Export a Provider - gotk export ap slack > slack.yaml + gotk export alert-provider slack > slack.yaml `, RunE: exportAlertProviderCmdRun, } diff --git a/cmd/gotk/export_receiver.go b/cmd/gotk/export_receiver.go index 108cdace..1acfb164 100644 --- a/cmd/gotk/export_receiver.go +++ b/cmd/gotk/export_receiver.go @@ -30,15 +30,14 @@ import ( ) var exportReceiverCmd = &cobra.Command{ - Use: "receiver [name]", - Aliases: []string{"rcv"}, - Short: "Export Receiver resources in YAML format", - Long: "The export receiver command exports one or all Receiver resources in YAML format.", + Use: "receiver [name]", + Short: "Export Receiver resources in YAML format", + Long: "The export receiver command exports one or all Receiver resources in YAML format.", Example: ` # Export all Receiver resources - gotk export rcv --all > receivers.yaml + gotk export receiver --all > receivers.yaml # Export a Receiver - gotk export rcv main > main.yaml + gotk export receiver main > main.yaml `, RunE: exportReceiverCmdRun, } diff --git a/cmd/gotk/get_alert.go b/cmd/gotk/get_alert.go index 7b13aba7..c30b3226 100644 --- a/cmd/gotk/get_alert.go +++ b/cmd/gotk/get_alert.go @@ -31,10 +31,9 @@ import ( ) var getAlertCmd = &cobra.Command{ - Use: "alerts", - Aliases: []string{}, - Short: "Get Alert statuses", - Long: "The get alert command prints the statuses of the resources.", + Use: "alerts", + Short: "Get Alert statuses", + Long: "The get alert command prints the statuses of the resources.", Example: ` # List all Alerts and their status gotk get alerts `, diff --git a/cmd/gotk/get_alertprovider.go b/cmd/gotk/get_alertprovider.go index 6617c86c..a9421d81 100644 --- a/cmd/gotk/get_alertprovider.go +++ b/cmd/gotk/get_alertprovider.go @@ -29,10 +29,9 @@ import ( ) var getAlertProviderCmd = &cobra.Command{ - Use: "alert-providers", - Aliases: []string{"ap"}, - Short: "Get Provider statuses", - Long: "The get alert-provider command prints the statuses of the resources.", + Use: "alert-providers", + Short: "Get Provider statuses", + Long: "The get alert-provider command prints the statuses of the resources.", Example: ` # List all Providers and their status gotk get alert-providers `, diff --git a/cmd/gotk/get_receiver.go b/cmd/gotk/get_receiver.go index 9a635cc1..c41bdce0 100644 --- a/cmd/gotk/get_receiver.go +++ b/cmd/gotk/get_receiver.go @@ -31,10 +31,9 @@ import ( ) var getReceiverCmd = &cobra.Command{ - Use: "receivers", - Aliases: []string{"rcv"}, - Short: "Get Receiver statuses", - Long: "The get receiver command prints the statuses of the resources.", + Use: "receivers", + Short: "Get Receiver statuses", + Long: "The get receiver command prints the statuses of the resources.", Example: ` # List all Receiver and their status gotk get receivers `, diff --git a/cmd/gotk/resume_alert.go b/cmd/gotk/resume_alert.go index 3621d09e..30190cb3 100644 --- a/cmd/gotk/resume_alert.go +++ b/cmd/gotk/resume_alert.go @@ -31,9 +31,8 @@ import ( ) var resumeAlertCmd = &cobra.Command{ - Use: "alert [name]", - Aliases: []string{}, - Short: "Resume a suspended Alert", + Use: "alert [name]", + Short: "Resume a suspended Alert", Long: `The resume command marks a previously suspended Alert resource for reconciliation and waits for it to finish the apply.`, Example: ` # Resume reconciliation for an existing Alert diff --git a/cmd/gotk/resume_receiver.go b/cmd/gotk/resume_receiver.go index eb4c0da3..14f30e70 100644 --- a/cmd/gotk/resume_receiver.go +++ b/cmd/gotk/resume_receiver.go @@ -31,13 +31,12 @@ import ( ) var resumeReceiverCmd = &cobra.Command{ - Use: "receiver [name]", - Aliases: []string{"rcv"}, - Short: "Resume a suspended Receiver", + Use: "receiver [name]", + Short: "Resume a suspended Receiver", Long: `The resume command marks a previously suspended Receiver resource for reconciliation and waits for it to finish the apply.`, Example: ` # Resume reconciliation for an existing Receiver - gotk resume rcv main + gotk resume receiver main `, RunE: resumeReceiverCmdRun, } diff --git a/cmd/gotk/suspend_alert.go b/cmd/gotk/suspend_alert.go index 555f9e3b..9e7a2388 100644 --- a/cmd/gotk/suspend_alert.go +++ b/cmd/gotk/suspend_alert.go @@ -27,10 +27,9 @@ import ( ) var suspendAlertCmd = &cobra.Command{ - Use: "alert [name]", - Aliases: []string{}, - Short: "Suspend reconciliation of Alert", - Long: "The suspend command disables the reconciliation of a Alert resource.", + Use: "alert [name]", + Short: "Suspend reconciliation of Alert", + Long: "The suspend command disables the reconciliation of a Alert resource.", Example: ` # Suspend reconciliation for an existing Alert gotk suspend alert main `, diff --git a/cmd/gotk/suspend_receiver.go b/cmd/gotk/suspend_receiver.go index 8cfb8dc4..bb9d0c0b 100644 --- a/cmd/gotk/suspend_receiver.go +++ b/cmd/gotk/suspend_receiver.go @@ -27,10 +27,9 @@ import ( ) var suspendReceiverCmd = &cobra.Command{ - Use: "receiver [name]", - Aliases: []string{"rcv"}, - Short: "Suspend reconciliation of Receiver", - Long: "The suspend command disables the reconciliation of a Receiver resource.", + Use: "receiver [name]", + Short: "Suspend reconciliation of Receiver", + Long: "The suspend command disables the reconciliation of a Receiver resource.", Example: ` # Suspend reconciliation for an existing Receiver gotk suspend receiver main `, diff --git a/docs/cmd/gotk_create_alert-provider.md b/docs/cmd/gotk_create_alert-provider.md index a2b0e5c1..99552023 100644 --- a/docs/cmd/gotk_create_alert-provider.md +++ b/docs/cmd/gotk_create_alert-provider.md @@ -14,14 +14,14 @@ gotk create alert-provider [name] [flags] ``` # Create a Provider for a Slack channel - gotk create ap slack \ + gotk create alert-provider slack \ --type slack \ --channel general \ --address https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK \ --secret-ref webhook-url # Create a Provider for a Github repository - gotk create ap github-podinfo \ + gotk create alert-provider github-podinfo \ --type github \ --address https://github.com/stefanprodan/podinfo \ --secret-ref github-token diff --git a/docs/cmd/gotk_create_receiver.md b/docs/cmd/gotk_create_receiver.md index 2138d25f..d6d053b9 100644 --- a/docs/cmd/gotk_create_receiver.md +++ b/docs/cmd/gotk_create_receiver.md @@ -14,7 +14,7 @@ gotk create receiver [name] [flags] ``` # Create a Receiver - gotk create rcv github-receiver \ + gotk create receiver github-receiver \ --type github \ --event ping \ --event push \ diff --git a/docs/cmd/gotk_delete_alert-provider.md b/docs/cmd/gotk_delete_alert-provider.md index e7772719..b380a787 100644 --- a/docs/cmd/gotk_delete_alert-provider.md +++ b/docs/cmd/gotk_delete_alert-provider.md @@ -14,7 +14,7 @@ gotk delete alert-provider [name] [flags] ``` # Delete a Provider and the Kubernetes resources created by it - gotk delete ap slack + gotk delete alert-provider slack ``` diff --git a/docs/cmd/gotk_export_alert-provider.md b/docs/cmd/gotk_export_alert-provider.md index 368c8975..f465b79f 100644 --- a/docs/cmd/gotk_export_alert-provider.md +++ b/docs/cmd/gotk_export_alert-provider.md @@ -14,10 +14,10 @@ gotk export alert-provider [name] [flags] ``` # Export all Provider resources - gotk export ap --all > alert-providers.yaml + gotk export alert-provider --all > alert-providers.yaml # Export a Provider - gotk export ap slack > slack.yaml + gotk export alert-provider slack > slack.yaml ``` diff --git a/docs/cmd/gotk_export_receiver.md b/docs/cmd/gotk_export_receiver.md index a9b0df63..2d884c57 100644 --- a/docs/cmd/gotk_export_receiver.md +++ b/docs/cmd/gotk_export_receiver.md @@ -14,10 +14,10 @@ gotk export receiver [name] [flags] ``` # Export all Receiver resources - gotk export rcv --all > receivers.yaml + gotk export receiver --all > receivers.yaml # Export a Receiver - gotk export rcv main > main.yaml + gotk export receiver main > main.yaml ``` diff --git a/docs/cmd/gotk_resume_receiver.md b/docs/cmd/gotk_resume_receiver.md index bd946a53..eb3d2317 100644 --- a/docs/cmd/gotk_resume_receiver.md +++ b/docs/cmd/gotk_resume_receiver.md @@ -15,7 +15,7 @@ gotk resume receiver [name] [flags] ``` # Resume reconciliation for an existing Receiver - gotk resume rcv main + gotk resume receiver main ```