etcdctl/ctlv3/command/role_command.go
func roleRevokePermissionCommandFunc(cmd *cobra.Command, args []string) {
	if len(args) < 2 {
		ExitWithError(ExitBadArgs, fmt.Errorf("role revoke-permission command requires role name and key [endkey] as its argument"))
	}

	key, rangeEnd := permRange(args[1:])
	resp, err := mustClientFromCmd(cmd).Auth.RoleRevokePermission(context.TODO(), args[0], key, rangeEnd)
	if err != nil {
		ExitWithError(ExitError, err)
	}
	display.RoleRevokePermission(args[0], args[1], rangeEnd, *resp)
}
func roleRevokePermissionCommandFunc(cmd *cobra.Command, args []string) {
	if len(args) < 2 {
		ExitWithError(ExitBadArgs, fmt.Errorf("role revoke-permission command requires role name and key [endkey] as its argument"))
	}

	key, rangeEnd := permRange(args[1:])
	resp, err := mustClientFromCmd(cmd).Auth.RoleRevokePermission(context.TODO(), args[0], key, rangeEnd)
	if err != nil {
		ExitWithError(ExitError, err)
	}
	display.RoleRevokePermission(args[0], args[1], rangeEnd, *resp)
}
func roleRevokePermissionCommandFunc ( cmd * cobra . Command , args [ ] string ) { if len ( args ) < 2 { ExitWithError ( ExitBadArgs , fmt . Errorf ( " " ) ) } key , rangeEnd := permRange ( args [ 1 : ] ) resp , err := mustClientFromCmd ( cmd ) . Auth . RoleRevokePermission ( context . TODO ( ) , args [ 0 ] , key , rangeEnd ) if err != nil { ExitWithError ( ExitError , err ) } display . RoleRevokePermission ( args [ 0 ] , args [ 1 ] , rangeEnd , * resp ) }
// roleRevokePermissionCommandFunc executes the "role revoke-permission" command.
roleRevokePermissionCommandFunc executes the role revoke - permission command .