From 01735641229cf061c66e3a5ab579c04fe75a6e7c Mon Sep 17 00:00:00 2001 From: Hitoshi Mitake Date: Mon, 20 Jun 2016 16:57:50 +0900 Subject: [PATCH] etcdctl: slightly enhance output of role revoke-permission --- etcdctl/ctlv3/command/role_command.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/etcdctl/ctlv3/command/role_command.go b/etcdctl/ctlv3/command/role_command.go index b0f10a8fd..3ae2f3d65 100644 --- a/etcdctl/ctlv3/command/role_command.go +++ b/etcdctl/ctlv3/command/role_command.go @@ -206,5 +206,9 @@ func roleRevokePermissionCommandFunc(cmd *cobra.Command, args []string) { ExitWithError(ExitError, err) } - fmt.Printf("Permission of key %s is revoked from role %s\n", args[1], args[0]) + if len(rangeEnd) == 0 { + fmt.Printf("Permission of key %s is revoked from role %s\n", args[1], args[0]) + } else { + fmt.Printf("Permission of range [%s, %s) is revoked from role %s\n", args[1], rangeEnd, args[0]) + } }