From ce674bfbac4825e3c622adbf4aae50e08713bc85 Mon Sep 17 00:00:00 2001 From: Lennart Espe <3391295+lnsp@users.noreply.github.com> Date: Wed, 10 Aug 2022 00:14:36 +0200 Subject: [PATCH] Rename RemoveDomain to DeleteDomain --- cmd/domains.go | 10 +++++----- pkg/api/client.go | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/cmd/domains.go b/cmd/domains.go index 51f277d..59efdab 100644 --- a/cmd/domains.go +++ b/cmd/domains.go @@ -82,9 +82,9 @@ var domainsAddCmd = &cobra.Command{ }), } -var domainsRemoveCmd = &cobra.Command{ - Use: "remove [domain]", - Short: "Removes an existing domain from the project", +var domainsDeleteCmd = &cobra.Command{ + Use: "delete [domain]", + Short: "Deletes an existing domain from the project", Args: cobra.ExactArgs(1), Run: runAndHandle(func(cmd *cobra.Command, args []string) error { var project string @@ -100,7 +100,7 @@ var domainsRemoveCmd = &cobra.Command{ if err != nil { return err } - if err := client.RemoveDomain(project, args[0]); err != nil { + if err := client.DeleteDomain(project, args[0]); err != nil { return err } return nil @@ -199,6 +199,6 @@ func initDomainsCmd() { domainsCmd.AddCommand(domainsVerifyCmd) domainsCmd.AddCommand(domainsLinkCmd) domainsCmd.AddCommand(domainsUnlinkCmd) - domainsCmd.AddCommand(domainsRemoveCmd) + domainsCmd.AddCommand(domainsDeleteCmd) rootCmd.AddCommand(domainsCmd) } diff --git a/pkg/api/client.go b/pkg/api/client.go index a353939..533cec6 100644 --- a/pkg/api/client.go +++ b/pkg/api/client.go @@ -324,7 +324,7 @@ func (client *Client) AddDomain(project, domain string) (map[string]string, erro return records, nil } -func (client *Client) RemoveDomain(project, domain string) error { +func (client *Client) DeleteDomain(project, domain string) error { var ( path = fmt.Sprintf("/projects/%s/domains/%s", project, domain) )