Skip to content

Commit

Permalink
Rename RemoveDomain to DeleteDomain
Browse files Browse the repository at this point in the history
  • Loading branch information
lnsp committed Aug 9, 2022
1 parent 889b79f commit ce674bf
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions cmd/domains.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -199,6 +199,6 @@ func initDomainsCmd() {
domainsCmd.AddCommand(domainsVerifyCmd)
domainsCmd.AddCommand(domainsLinkCmd)
domainsCmd.AddCommand(domainsUnlinkCmd)
domainsCmd.AddCommand(domainsRemoveCmd)
domainsCmd.AddCommand(domainsDeleteCmd)
rootCmd.AddCommand(domainsCmd)
}
2 changes: 1 addition & 1 deletion pkg/api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand Down

0 comments on commit ce674bf

Please sign in to comment.