From cf42a133c81302699479fe63fc4d052fe8bc26b9 Mon Sep 17 00:00:00 2001 From: Ben Jackson Date: Fri, 19 Jul 2024 08:35:22 +1000 Subject: [PATCH] fix: make email flag consistent (#361) * fix: make email flag consistent * chore: update wording on router pattern flag --- cmd/deploytarget.go | 4 ++-- cmd/list.go | 8 ++++---- docs/commands/lagoon_add_deploytarget.md | 2 +- docs/commands/lagoon_list_all-users.md | 4 ++-- docs/commands/lagoon_list_user-groups.md | 4 ++-- docs/commands/lagoon_update_deploytarget.md | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/cmd/deploytarget.go b/cmd/deploytarget.go index 95672dd7..66bcc259 100644 --- a/cmd/deploytarget.go +++ b/cmd/deploytarget.go @@ -458,7 +458,7 @@ func init() { addDeployTargetCmd.Flags().StringP("name", "", "", "Name of DeployTarget") addDeployTargetCmd.Flags().StringP("console-url", "", "", "DeployTarget console URL") addDeployTargetCmd.Flags().StringP("token", "", "", "DeployTarget token") - addDeployTargetCmd.Flags().StringP("router-pattern", "", "", "DeployTarget router-pattern") + addDeployTargetCmd.Flags().StringP("router-pattern", "", "", "Router pattern of the DeployTarget, e.g. '${service}-${environment}-${project}.lagoon.example.com'") addDeployTargetCmd.Flags().StringP("friendly-name", "", "", "DeployTarget friendly name") addDeployTargetCmd.Flags().StringP("cloud-provider", "", "", "DeployTarget cloud provider") addDeployTargetCmd.Flags().StringP("cloud-region", "", "", "DeployTarget cloud region") @@ -478,7 +478,7 @@ func init() { updateDeployTargetCmd.Flags().UintP("id", "", 0, "ID of the DeployTarget") updateDeployTargetCmd.Flags().StringP("console-url", "", "", "DeployTarget console URL") updateDeployTargetCmd.Flags().StringP("token", "", "", "DeployTarget token") - updateDeployTargetCmd.Flags().StringP("router-pattern", "", "", "DeployTarget router-pattern") + updateDeployTargetCmd.Flags().StringP("router-pattern", "", "", "Router pattern of the DeployTarget, e.g. '${service}-${environment}-${project}.lagoon.example.com'") updateDeployTargetCmd.Flags().StringP("friendly-name", "", "", "DeployTarget friendly name") updateDeployTargetCmd.Flags().StringP("cloud-provider", "", "", "DeployTarget cloud provider") updateDeployTargetCmd.Flags().StringP("cloud-region", "", "", "DeployTarget cloud region") diff --git a/cmd/list.go b/cmd/list.go index 7c895278..efa302cc 100644 --- a/cmd/list.go +++ b/cmd/list.go @@ -627,7 +627,7 @@ This query can take a long time to run if there are a lot of users.`, if err != nil { return err } - emailAddress, err := cmd.Flags().GetString("email-address") + emailAddress, err := cmd.Flags().GetString("email") if err != nil { return err } @@ -677,7 +677,7 @@ var listUsersGroupsCmd = &cobra.Command{ if err != nil { return err } - emailAddress, err := cmd.Flags().GetString("email-address") + emailAddress, err := cmd.Flags().GetString("email") if err != nil { return err } @@ -1207,8 +1207,8 @@ func init() { listCmd.AddCommand(listOrganizationGroupsCmd) listCmd.AddCommand(listOrganizationDeployTargetsCmd) listCmd.AddCommand(listOrganizationsCmd) - listAllUsersCmd.Flags().StringP("email-address", "E", "", "The email address of a user") - listUsersGroupsCmd.Flags().StringP("email-address", "E", "", "The email address of a user") + listAllUsersCmd.Flags().StringP("email", "E", "", "The email address of a user") + listUsersGroupsCmd.Flags().StringP("email", "E", "", "The email address of a user") listCmd.Flags().BoolVarP(&listAllProjects, "all-projects", "", false, "All projects (if supported)") listUsersCmd.Flags().StringVarP(&groupName, "name", "N", "", "Name of the group to list users in") listGroupProjectsCmd.Flags().StringP("name", "N", "", "Name of the group to list projects in") diff --git a/docs/commands/lagoon_add_deploytarget.md b/docs/commands/lagoon_add_deploytarget.md index 0b4cbca8..5470bdbd 100644 --- a/docs/commands/lagoon_add_deploytarget.md +++ b/docs/commands/lagoon_add_deploytarget.md @@ -21,7 +21,7 @@ lagoon add deploytarget [flags] -h, --help help for deploytarget --id uint ID of the DeployTarget --name string Name of DeployTarget - --router-pattern string DeployTarget router-pattern + --router-pattern string Router pattern of the DeployTarget, e.g. '${service}-${environment}-${project}.lagoon.example.com' --ssh-host string DeployTarget ssh host --ssh-port string DeployTarget ssh port --token string DeployTarget token diff --git a/docs/commands/lagoon_list_all-users.md b/docs/commands/lagoon_list_all-users.md index 70d80183..32fdb78c 100644 --- a/docs/commands/lagoon_list_all-users.md +++ b/docs/commands/lagoon_list_all-users.md @@ -14,8 +14,8 @@ lagoon list all-users [flags] ### Options ``` - -E, --email-address string The email address of a user - -h, --help help for all-users + -E, --email string The email address of a user + -h, --help help for all-users ``` ### Options inherited from parent commands diff --git a/docs/commands/lagoon_list_user-groups.md b/docs/commands/lagoon_list_user-groups.md index 7ed85a4e..0f47ba95 100644 --- a/docs/commands/lagoon_list_user-groups.md +++ b/docs/commands/lagoon_list_user-groups.md @@ -13,8 +13,8 @@ lagoon list user-groups [flags] ### Options ``` - -E, --email-address string The email address of a user - -h, --help help for user-groups + -E, --email string The email address of a user + -h, --help help for user-groups ``` ### Options inherited from parent commands diff --git a/docs/commands/lagoon_update_deploytarget.md b/docs/commands/lagoon_update_deploytarget.md index e35a9daa..2b31e7c5 100644 --- a/docs/commands/lagoon_update_deploytarget.md +++ b/docs/commands/lagoon_update_deploytarget.md @@ -20,7 +20,7 @@ lagoon update deploytarget [flags] --friendly-name string DeployTarget friendly name -h, --help help for deploytarget --id uint ID of the DeployTarget - --router-pattern string DeployTarget router-pattern + --router-pattern string Router pattern of the DeployTarget, e.g. '${service}-${environment}-${project}.lagoon.example.com' --ssh-host string DeployTarget ssh host --ssh-port string DeployTarget ssh port --token string DeployTarget token