diff --git a/pkg/user/admin/accept.go b/pkg/user/admin/accept.go index a6d78648..2e7147a6 100644 --- a/pkg/user/admin/accept.go +++ b/pkg/user/admin/accept.go @@ -27,12 +27,8 @@ type AcceptAdminWriter interface { func AcceptCmd(generator func(logging.Logger, *acceptAdminConfig) (AcceptAdminWriter, error)) *cli.Command { acceptCmd := &cli.Command{ - Name: "accept-admin", - Usage: "user admin accept-admin --account-address ", - UsageText: "Accepts a user to become admin who is currently pending admin acceptance.", - Description: ` - Accepts a user to become admin who is currently pending admin acceptance. - `, + Name: "accept-admin", + Usage: "Accepts a user to become admin who is currently pending admin acceptance.", Action: func(c *cli.Context) error { return acceptAdmin(c, generator) }, diff --git a/pkg/user/admin/add_pending.go b/pkg/user/admin/add_pending.go index 95877759..d1cccd60 100644 --- a/pkg/user/admin/add_pending.go +++ b/pkg/user/admin/add_pending.go @@ -27,12 +27,8 @@ type AddPendingAdminWriter interface { func AddPendingCmd(generator func(logging.Logger, *addPendingAdminConfig) (AddPendingAdminWriter, error)) *cli.Command { addPendingCmd := &cli.Command{ - Name: "add-pending-admin", - Usage: "user admin add-pending-admin --account-address --admin-address ", - UsageText: "Add an admin to be pending until accepted.", - Description: ` - Add an admin to be pending until accepted. - `, + Name: "add-pending-admin", + Usage: "Add an admin to be pending until accepted.", Action: func(context *cli.Context) error { return addPendingAdmin(context, generator) }, diff --git a/pkg/user/admin/admin.go b/pkg/user/admin/admin.go index d512e7b4..1faa5e86 100644 --- a/pkg/user/admin/admin.go +++ b/pkg/user/admin/admin.go @@ -9,12 +9,8 @@ import ( func AdminCmd(prompter utils.Prompter) *cli.Command { adminCmd := &cli.Command{ - Name: "admin", - Usage: "user admin ", - UsageText: "Manage admin users.", - Description: ` - Manage admin users. - `, + Name: "admin", + Usage: "Manage admin users.", After: telemetry.AfterRunAction(), Flags: []cli.Flag{ &flags.VerboseFlag, diff --git a/pkg/user/admin/is_admin.go b/pkg/user/admin/is_admin.go index d8d736a0..2f2a8936 100644 --- a/pkg/user/admin/is_admin.go +++ b/pkg/user/admin/is_admin.go @@ -28,12 +28,8 @@ type IsAdminReader interface { func IsAdminCmd(readerGenerator func(logging.Logger, *isAdminConfig) (IsAdminReader, error)) *cli.Command { cmd := &cli.Command{ - Name: "is-admin", - Usage: "user admin is-admin --account-address --admin-address ", - UsageText: "Checks if a user is an admin.", - Description: ` - Checks if a user is an admin. - `, + Name: "is-admin", + Usage: "Checks if a user is an admin.", Action: func(c *cli.Context) error { return isAdmin(c, readerGenerator) }, diff --git a/pkg/user/admin/is_pending.go b/pkg/user/admin/is_pending.go index 511bed08..cdcdab99 100644 --- a/pkg/user/admin/is_pending.go +++ b/pkg/user/admin/is_pending.go @@ -30,12 +30,8 @@ func IsPendingCmd( readerGenerator func(logging.Logger, *isPendingAdminConfig) (IsPendingAdminReader, error), ) *cli.Command { isPendingCmd := &cli.Command{ - Name: "is-pending-admin", - Usage: "user admin is-pending-admin --account-address --pending-admin-address ", - UsageText: "Checks if a user is pending acceptance to admin.", - Description: ` - Checks if a user is pending acceptance to admin. - `, + Name: "is-pending-admin", + Usage: "Checks if a user is pending acceptance to admin.", Action: func(c *cli.Context) error { return isPendingAdmin(c, readerGenerator) }, diff --git a/pkg/user/admin/list.go b/pkg/user/admin/list.go index 5169b4f7..417f55b0 100644 --- a/pkg/user/admin/list.go +++ b/pkg/user/admin/list.go @@ -28,12 +28,8 @@ type ListAdminsReader interface { func ListCmd(readerGenerator func(logging.Logger, *listAdminsConfig) (ListAdminsReader, error)) *cli.Command { listCmd := &cli.Command{ - Name: "list-admins", - Usage: "user admin list-admins --account-address ", - UsageText: "List all users who are admins.", - Description: ` - List all users who are admins. - `, + Name: "list-admins", + Usage: "List all users who are admins.", Action: func(c *cli.Context) error { return listAdmins(c, readerGenerator) }, diff --git a/pkg/user/admin/list_pending.go b/pkg/user/admin/list_pending.go index 546640ac..d724b7ab 100644 --- a/pkg/user/admin/list_pending.go +++ b/pkg/user/admin/list_pending.go @@ -30,12 +30,8 @@ func ListPendingCmd( readerGenerator func(logging.Logger, *listPendingAdminsConfig) (ListPendingAdminsReader, error), ) *cli.Command { listPendingCmd := &cli.Command{ - Name: "list-pending-admins", - Usage: "user admin list-pending-admins --account-address ", - UsageText: "List all users who are pending admin acceptance.", - Description: ` - List all users who are pending admin acceptance. - `, + Name: "list-pending-admins", + Usage: "List all users who are pending admin acceptance.", Action: func(c *cli.Context) error { return listPendingAdmins(c, readerGenerator) }, diff --git a/pkg/user/admin/remove.go b/pkg/user/admin/remove.go index 69c063ee..69cb30ea 100644 --- a/pkg/user/admin/remove.go +++ b/pkg/user/admin/remove.go @@ -27,12 +27,8 @@ type RemoveAdminWriter interface { func RemoveCmd(generator func(logging.Logger, *removeAdminConfig) (RemoveAdminWriter, error)) *cli.Command { removeCmd := &cli.Command{ - Name: "remove-admin", - Usage: "user admin remove-admin --account-address --admin-address ", - UsageText: "The remove command allows you to remove an admin user.", - Description: ` - The remove command allows you to remove an admin user. - `, + Name: "remove-admin", + Usage: "The remove command allows you to remove an admin user.", Action: func(context *cli.Context) error { return removeAdmin(context, generator) }, diff --git a/pkg/user/admin/remove_pending.go b/pkg/user/admin/remove_pending.go index b70edd29..55a10b14 100644 --- a/pkg/user/admin/remove_pending.go +++ b/pkg/user/admin/remove_pending.go @@ -29,12 +29,8 @@ func RemovePendingCmd( generator func(logging.Logger, *removePendingAdminConfig) (RemovePendingAdminWriter, error), ) *cli.Command { removeCmd := &cli.Command{ - Name: "remove-pending-admin", - Usage: "user admin remove-pending-admin --account-address --admin-address ", - UsageText: "Remove a user who is pending admin acceptance.", - Description: ` - Remove a user who is pending admin acceptance. - `, + Name: "remove-pending-admin", + Usage: "Remove a user who is pending admin acceptance.", Action: func(context *cli.Context) error { return removePendingAdmin(context, generator) }, diff --git a/pkg/user/appointee/appointee.go b/pkg/user/appointee/appointee.go index 2c063953..6882b72d 100644 --- a/pkg/user/appointee/appointee.go +++ b/pkg/user/appointee/appointee.go @@ -9,12 +9,8 @@ import ( func AppointeeCmd(prompter utils.Prompter) *cli.Command { appointeeCmd := &cli.Command{ - Name: "appointee", - Usage: "user appointee ", - UsageText: "User permission management operations.", - Description: ` - User permission management operations. - `, + Name: "appointee", + Usage: "User permission management operations.", After: telemetry.AfterRunAction(), Flags: []cli.Flag{ &flags.VerboseFlag, diff --git a/pkg/user/appointee/can_call.go b/pkg/user/appointee/can_call.go index ff9ed223..c5b79c97 100644 --- a/pkg/user/appointee/can_call.go +++ b/pkg/user/appointee/can_call.go @@ -29,12 +29,8 @@ type CanCallReader interface { func canCallCmd(readerGenerator func(logging.Logger, *canCallConfig) (CanCallReader, error)) *cli.Command { cmd := &cli.Command{ - Name: "can-call", - Usage: "user appointee can-call --account-address --appointee-address --target-address --selector ", - UsageText: "Checks if an appointee has a specific permission.", - Description: ` - Checks if an appointee has a specific permission. - `, + Name: "can-call", + Usage: "Checks if an appointee has a specific permission.", Action: func(c *cli.Context) error { return canCall(c, readerGenerator) }, diff --git a/pkg/user/appointee/list.go b/pkg/user/appointee/list.go index 7d244764..541a4cd1 100644 --- a/pkg/user/appointee/list.go +++ b/pkg/user/appointee/list.go @@ -29,12 +29,8 @@ type ListAppointeesReader interface { func ListCmd(readerGenerator func(logging.Logger, *listAppointeesConfig) (ListAppointeesReader, error)) *cli.Command { listCmd := &cli.Command{ - Name: "list", - Usage: "user appointee list --account-address --target-address --selector ", - UsageText: "Lists all appointed addresses for an account with the provided permissions.", - Description: ` - Lists all appointed addresses for an account with the provided permissions. - `, + Name: "list", + Usage: "Lists all appointed addresses for an account with the provided permissions.", Action: func(c *cli.Context) error { return listAppointees(c, readerGenerator) }, diff --git a/pkg/user/appointee/list_permissions.go b/pkg/user/appointee/list_permissions.go index 470f4184..f3845cd1 100644 --- a/pkg/user/appointee/list_permissions.go +++ b/pkg/user/appointee/list_permissions.go @@ -30,12 +30,8 @@ func ListPermissionsCmd( readerGenerator func(logging.Logger, *listAppointeePermissionsConfig) (PermissionsReader, error), ) *cli.Command { cmd := &cli.Command{ - Name: "list-permissions", - Usage: "user appointee list-permissions --account-address --appointee-address ", - UsageText: "List all permissions for a user.", - Description: ` - List all permissions of a user. - `, + Name: "list-permissions", + Usage: "List all permissions of a user.", Action: func(c *cli.Context) error { return listPermissions(c, readerGenerator) }, diff --git a/pkg/user/appointee/remove.go b/pkg/user/appointee/remove.go index 93d9d4b8..c564acc0 100644 --- a/pkg/user/appointee/remove.go +++ b/pkg/user/appointee/remove.go @@ -31,12 +31,8 @@ type RemoveAppointeePermissionWriter interface { func RemoveCmd(generator func(logging.Logger, *removeConfig) (RemoveAppointeePermissionWriter, error)) *cli.Command { removeCmd := &cli.Command{ - Name: "remove", - Usage: "user appointee remove --account-address --appointee-address --target-address --selector ", - UsageText: "Remove an appointee's permission", - Description: ` - Remove an appointee's permission'. - `, + Name: "remove", + Usage: "Remove an appointee's permission", After: telemetry.AfterRunAction(), Action: func(c *cli.Context) error { return removeAppointeePermission(c, generator) diff --git a/pkg/user/appointee/set.go b/pkg/user/appointee/set.go index 7c29c990..407fb1a0 100644 --- a/pkg/user/appointee/set.go +++ b/pkg/user/appointee/set.go @@ -31,12 +31,8 @@ type SetAppointeePermissionWriter interface { func SetCmd(generator func(logging.Logger, *setConfig) (SetAppointeePermissionWriter, error)) *cli.Command { setCmd := &cli.Command{ - Name: "set", - Usage: "user appointee set --account-address --appointee-address --target-address --selector ", - UsageText: "Grant an appointee a permission.", - Description: ` - Grant an appointee a permission. - `, + Name: "set", + Usage: "Grant an appointee a permission.", Action: func(c *cli.Context) error { return setAppointeePermission(c, generator) },