Merge pull request #5723 from mitake/etcdctl-misc

etcdctl: slightly enhance output of role revoke-permission
release-3.0
Xiang Li 2016-06-20 06:14:28 -07:00 committed by GitHub
commit 6e717775a8
1 changed files with 5 additions and 1 deletions

View File

@ -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])
}
}