瀏覽代碼

etcdctl: slightly enhance output of role revoke-permission

Hitoshi Mitake 9 年之前
父節點
當前提交
0173564122
共有 1 個文件被更改,包括 5 次插入1 次删除
  1. 5 1
      etcdctl/ctlv3/command/role_command.go

+ 5 - 1
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])
+	}
 }